diff --git a/.eslintrc.json b/.eslintrc.json index fc69158..9aa7609 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,8 +1,8 @@ { "root": true, "extends": [ - "wikimedia/client-common", - "wikimedia/language/es2022", + "wikimedia/client", + "wikimedia/jquery", "wikimedia/mediawiki" ] } diff --git a/resources/.eslintrc.json b/resources/.eslintrc.json index 1512a2c..4d373b5 100644 --- a/resources/.eslintrc.json +++ b/resources/.eslintrc.json @@ -1,8 +1,7 @@ { "root": true, "extends": [ - "wikimedia/client-common", - "wikimedia/language/es2022", + "wikimedia/client-es5", "wikimedia/mediawiki", "wikimedia/jquery" ], diff --git a/resources/main.js b/resources/main.js index 75e9da8..f4eadc0 100644 --- a/resources/main.js +++ b/resources/main.js @@ -1,11 +1,11 @@ /* Write | CC0 license | https://git.qiuwen.net.cn/Qiuwen/mediawiki-skins-Write */ -$( () => { +$( function () { /* * Site navigation * adds proper Bootstrap CSS class to links added via mw.util.addPortletLink() */ - const writeNavigation = () => { + var writeNavigation = function () { $( '#p-personal li a:not(.dropdown-item), aside li a:not(.dropdown-item)' ).addClass( 'dropdown-item' ); @@ -15,14 +15,14 @@ $( () => { /* * Hide aside menu with no dropdown items */ - const hideAsideDropdown = () => { + var hideAsideDropdown = function () { $( 'aside .dropdown' ).has( 'div:empty' ).hide(); }; /* * Remove echo notifications popup on smaller screens */ - const writeRemoveEchoPopup = () => { + var writeRemoveEchoPopup = function () { if ( $( window ).width() <= 650 ) { $( 'a.mw-echo-notifications-badge' ).off( 'click' ); } @@ -32,7 +32,7 @@ $( () => { * Hamburger menu * opens navigation sidebar and login/user menu */ - const writeTogglehamb = () => { + var writeTogglehamb = function () { $( '#mw-navigation nav' ).toggle( 'fast' ); }; @@ -48,7 +48,7 @@ $( () => { // repeat every 1 s for 10 s after DOM content loaded window.writeVarI = 0; - window.writeTimer = window.setInterval( () => { + window.writeTimer = window.setInterval( function () { writeNavigation(); writeRemoveEchoPopup(); window.writeVarI++; diff --git a/skin.json b/skin.json index 6af0ef7..8b6ad10 100644 --- a/skin.json +++ b/skin.json @@ -104,7 +104,6 @@ ] }, "skins.write.js": { - "es6": true, "targets": ["desktop", "mobile"], "packageFiles": ["resources/main.js"] }