GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 155-155 lines in 2 locations

third-party/uikit/uikit-2.27.4/js/uikit.js 1 location

@@ 1811-1965 (lines=155) @@
1808
1809
})(UIkit2);
1810
1811
(function(UI) {
1812
1813
    "use strict";
1814
1815
    UI.component('buttonRadio', {
1816
1817
        defaults: {
1818
            activeClass: 'uk-active',
1819
            target: '.uk-button'
1820
        },
1821
1822
        boot: function() {
1823
1824
            // init code
1825
            UI.$html.on('click.buttonradio.uikit', '[data-uk-button-radio]', function(e) {
1826
1827
                var ele = UI.$(this);
1828
1829
                if (!ele.data('buttonRadio')) {
1830
1831
                    var obj    = UI.buttonRadio(ele, UI.Utils.options(ele.attr('data-uk-button-radio'))),
1832
                        target = UI.$(e.target);
1833
1834
                    if (target.is(obj.options.target)) {
1835
                        target.trigger('click');
1836
                    }
1837
                }
1838
            });
1839
        },
1840
1841
        init: function() {
1842
1843
            var $this = this;
1844
1845
            // Init ARIA
1846
            this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
1847
1848
            this.on('click', this.options.target, function(e) {
1849
1850
                var ele = UI.$(this);
1851
1852
                if (ele.is('a[href="#"]')) e.preventDefault();
1853
1854
                $this.find($this.options.target).not(ele).removeClass($this.options.activeClass).blur();
1855
                ele.addClass($this.options.activeClass);
1856
1857
                // Update ARIA
1858
                $this.find($this.options.target).not(ele).attr('aria-checked', 'false');
1859
                ele.attr('aria-checked', 'true');
1860
1861
                $this.trigger('change.uk.button', [ele]);
1862
            });
1863
1864
        },
1865
1866
        getSelected: function() {
1867
            return this.find('.' + this.options.activeClass);
1868
        }
1869
    });
1870
1871
    UI.component('buttonCheckbox', {
1872
1873
        defaults: {
1874
            activeClass: 'uk-active',
1875
            target: '.uk-button'
1876
        },
1877
1878
        boot: function() {
1879
1880
            UI.$html.on('click.buttoncheckbox.uikit', '[data-uk-button-checkbox]', function(e) {
1881
                var ele = UI.$(this);
1882
1883
                if (!ele.data('buttonCheckbox')) {
1884
1885
                    var obj    = UI.buttonCheckbox(ele, UI.Utils.options(ele.attr('data-uk-button-checkbox'))),
1886
                        target = UI.$(e.target);
1887
1888
                    if (target.is(obj.options.target)) {
1889
                        target.trigger('click');
1890
                    }
1891
                }
1892
            });
1893
        },
1894
1895
        init: function() {
1896
1897
            var $this = this;
1898
1899
            // Init ARIA
1900
            this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
1901
1902
            this.on('click', this.options.target, function(e) {
1903
                var ele = UI.$(this);
1904
1905
                if (ele.is('a[href="#"]')) e.preventDefault();
1906
1907
                ele.toggleClass($this.options.activeClass).blur();
1908
1909
                // Update ARIA
1910
                ele.attr('aria-checked', ele.hasClass($this.options.activeClass));
1911
1912
                $this.trigger('change.uk.button', [ele]);
1913
            });
1914
1915
        },
1916
1917
        getSelected: function() {
1918
            return this.find('.' + this.options.activeClass);
1919
        }
1920
    });
1921
1922
1923
    UI.component('button', {
1924
1925
        defaults: {},
1926
1927
        boot: function() {
1928
1929
            UI.$html.on('click.button.uikit', '[data-uk-button]', function(e) {
1930
                var ele = UI.$(this);
1931
1932
                if (!ele.data('button')) {
1933
1934
                    var obj = UI.button(ele, UI.Utils.options(ele.attr('data-uk-button')));
1935
                    ele.trigger('click');
1936
                }
1937
            });
1938
        },
1939
1940
        init: function() {
1941
1942
            var $this = this;
1943
1944
            // Init ARIA
1945
            this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
1946
1947
            this.on('click', function(e) {
1948
1949
                if ($this.element.is('a[href="#"]')) e.preventDefault();
1950
1951
                $this.toggle();
1952
                $this.trigger('change.uk.button', [$this.element.blur().hasClass('uk-active')]);
1953
            });
1954
1955
        },
1956
1957
        toggle: function() {
1958
            this.element.toggleClass('uk-active');
1959
1960
            // Update ARIA
1961
            this.element.attr('aria-pressed', this.element.hasClass('uk-active'));
1962
        }
1963
    });
1964
1965
})(UIkit2);
1966
1967
(function(UI) {
1968

third-party/uikit/uikit-2.27.4/js/core/button.js 1 location

@@ 2-156 (lines=155) @@
1
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
(function(UI) {
3
4
    "use strict";
5
6
    UI.component('buttonRadio', {
7
8
        defaults: {
9
            activeClass: 'uk-active',
10
            target: '.uk-button'
11
        },
12
13
        boot: function() {
14
15
            // init code
16
            UI.$html.on('click.buttonradio.uikit', '[data-uk-button-radio]', function(e) {
17
18
                var ele = UI.$(this);
19
20
                if (!ele.data('buttonRadio')) {
21
22
                    var obj    = UI.buttonRadio(ele, UI.Utils.options(ele.attr('data-uk-button-radio'))),
23
                        target = UI.$(e.target);
24
25
                    if (target.is(obj.options.target)) {
26
                        target.trigger('click');
27
                    }
28
                }
29
            });
30
        },
31
32
        init: function() {
33
34
            var $this = this;
35
36
            // Init ARIA
37
            this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
38
39
            this.on('click', this.options.target, function(e) {
40
41
                var ele = UI.$(this);
42
43
                if (ele.is('a[href="#"]')) e.preventDefault();
44
45
                $this.find($this.options.target).not(ele).removeClass($this.options.activeClass).blur();
46
                ele.addClass($this.options.activeClass);
47
48
                // Update ARIA
49
                $this.find($this.options.target).not(ele).attr('aria-checked', 'false');
50
                ele.attr('aria-checked', 'true');
51
52
                $this.trigger('change.uk.button', [ele]);
53
            });
54
55
        },
56
57
        getSelected: function() {
58
            return this.find('.' + this.options.activeClass);
59
        }
60
    });
61
62
    UI.component('buttonCheckbox', {
63
64
        defaults: {
65
            activeClass: 'uk-active',
66
            target: '.uk-button'
67
        },
68
69
        boot: function() {
70
71
            UI.$html.on('click.buttoncheckbox.uikit', '[data-uk-button-checkbox]', function(e) {
72
                var ele = UI.$(this);
73
74
                if (!ele.data('buttonCheckbox')) {
75
76
                    var obj    = UI.buttonCheckbox(ele, UI.Utils.options(ele.attr('data-uk-button-checkbox'))),
77
                        target = UI.$(e.target);
78
79
                    if (target.is(obj.options.target)) {
80
                        target.trigger('click');
81
                    }
82
                }
83
            });
84
        },
85
86
        init: function() {
87
88
            var $this = this;
89
90
            // Init ARIA
91
            this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
92
93
            this.on('click', this.options.target, function(e) {
94
                var ele = UI.$(this);
95
96
                if (ele.is('a[href="#"]')) e.preventDefault();
97
98
                ele.toggleClass($this.options.activeClass).blur();
99
100
                // Update ARIA
101
                ele.attr('aria-checked', ele.hasClass($this.options.activeClass));
102
103
                $this.trigger('change.uk.button', [ele]);
104
            });
105
106
        },
107
108
        getSelected: function() {
109
            return this.find('.' + this.options.activeClass);
110
        }
111
    });
112
113
114
    UI.component('button', {
115
116
        defaults: {},
117
118
        boot: function() {
119
120
            UI.$html.on('click.button.uikit', '[data-uk-button]', function(e) {
121
                var ele = UI.$(this);
122
123
                if (!ele.data('button')) {
124
125
                    var obj = UI.button(ele, UI.Utils.options(ele.attr('data-uk-button')));
126
                    ele.trigger('click');
127
                }
128
            });
129
        },
130
131
        init: function() {
132
133
            var $this = this;
134
135
            // Init ARIA
136
            this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
137
138
            this.on('click', function(e) {
139
140
                if ($this.element.is('a[href="#"]')) e.preventDefault();
141
142
                $this.toggle();
143
                $this.trigger('change.uk.button', [$this.element.blur().hasClass('uk-active')]);
144
            });
145
146
        },
147
148
        toggle: function() {
149
            this.element.toggleClass('uk-active');
150
151
            // Update ARIA
152
            this.element.attr('aria-pressed', this.element.hasClass('uk-active'));
153
        }
154
    });
155
156
})(UIkit2);
157