PageSourceSearch

https://www.moaa.org/Static/Redesign/assets/scripts/content.migration.js

js moaa.org collected 2026-10-01 10:32:48 UTC 3,462 bytes, 101 lines download raw bytes

1$(document).ready(function () {
2    $('.content-migration').ready(function () {
3
4        $.fn.hasAttr = function (name) {
5            return this.attr(name) !== undefined;
6        };
7
8        $('strong').replaceWith(function () {
9            return $('<span style="font-weight: bold;">').append($(this).html());
10        });
11
12        $('em').replaceWith(function () {
13            return $('<span style="font-style: italic;">').append($(this).html());
14        });
15
16        // for images
17        $(".content-migration img").each(function (index) {
18            if (!$(this).hasAttr('class')) {
19                $(this).addClass("news-article__figure-full-img");
20
21                //$(this).replaceWith(function () {
22                //    return $('<img class="news-article__figure-full-img">').append($(this).html())
23                //});
24            }
25        });
26
27        // for list
28        if ($('ul').hasClass('bullet')) {
29            $('ul.bullet').removeClass('bullet').addClass('news-article__ul');
30        }
31
32        // for list
33        $(".content-migration > ul").each(function () {
34            if (!$(this).hasAttr('class')) {
35                $(this).replaceWith(function () {
36                    return $('<ul class="news-article__ul">').append($(this).html());
37                });
38            }
39        });
40
41        // for italic
42        $("i").each(function () {
43            if (!$(this).hasAttr('class')) {
44                $(this).replaceWith(function () {
45                    return $('<span style="font-style: italic;">').append($(this).html());
46                });
47            }
48        });
49
50        // for h1
51        $(".content-migration > h1").each(function () {
52            if (!$(this).hasAttr('class')) {
53                $(this).replaceWith(function () {
54                    return $('<h1 class="h1">').append($(this).html());
55                });
56            }
57        });
58        // for h2
59        $(".content-migration > h2").each(function () {
60            if (!$(this).hasAttr('class')) {
61                $(this).replaceWith(function () {
62                    return $('<h2 class="h2">').append($(this).html());
63                });
64            }
65        });
66        // for h3
67        $(".content-migration > h3").each(function () {
68            if (!$(this).hasAttr('class')) {
69                $(this).replaceWith(function () {
70                    return $('<h3 class="h3">').append($(this).html());
71                });
72            }
73        });
74        // for h4
75        $(".content-migration > h4").each(function () {
76            if (!$(this).hasAttr('class')) {
77                $(this).replaceWith(function () {
78                    return $('<h4 class="h4">').append($(this).html());
79                });
80            }
81        });
82        // for h5
83        $(".content-migration > h5").each(function () {
84            if (!$(this).hasAttr('class')) {
85                $(this).replaceWith(function () {
86                    return $('<h5 class="h5">').append($(this).html());
87                });
88            }
89        });
90        // for h6
91        $(".content-migration > h6").each(function () {
92            if (!$(this).hasAttr('class')) {
93                $(this).replaceWith(function () {
94                    return $('<h6 class="h6">').append($(this).html());
95                });
96            }
97        });
98
99    });
100});// document ready
101

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.