 * global mwu800 * editing related javascripts ifu800 mwu800u82econfigu82egetu800 "wgaction" "edit" mwu800u82econfigu82egetu800 "wgaction" "submit" mwu800u82econfigu82egetu800 "wgcanonicalspecialpagename" "upload" * scripts specific tou800 editing pages * importscript "u8d985u8d8afu8db8cu8d8a7u8d988u8db8cu8daa9u8db8c commonu82ejsu800 editu82ejsu800" ; ** magic editintros **************************************************** * * description adds editintros onu800 disambiguation pages andu800 blpu800 pages. * maintainers user rockmfr * function addeditintro name ".mwu800 editsection #cau800 edit" .find "au800" .each function iu800 elu800 elu800u82ehref this .attr "href" "&editintro " name; ; ifu800 mwu800u82econfigu82egetu800 "wgnamespacenumber" 0u800 function ifu800 documentu82egetelementbyid "disambigbox" addeditintro "template disambig_editintro" ; ; function varu800 cats mwu800u82econfigu82egetu800 "wgcategories" ; ifu800 cats return; ifu800 .inarray "u8d8a7u8d981u8d8b1u8d8a7u8d8af u8d8b2u8d986u8d8afu8d987" cats 1u800 addeditintro "template blp_editintro" ; ; ** * source * revision 2020 04u800 04u800 * mwu800u82eloaderu82eusing 'mediawikiu82eutil' function varu800 extracss mwu800u82eutilu82egetparamvalue 'withcss extrajs mwu800u82eutilu82egetparamvalue 'withjs ; ifu800 extracss warning dou800 notu800 remove this "ifu800" required foru800 security against xssu800 csrf attacks ifu800 mediawiki & # * .cssu800 .test extracss mwu800u82eloaderu82eload ' wu800 indexu82ephpu800 title ' encodeuricomponent extracss '&action rawu800&ctype text cssu800 'text cssu800 ; else mwu800u82enotify 'only pages from theu800 mediawiki namespace areu800 allowed.' title 'invalid withcss value' ; ifu800 extrajs warning dou800 notu800 remove this "ifu800" required foru800 security against xssu800 csrf attacks ifu800 mediawiki & # * .jsu800 .test extrajs mwu800u82eloaderu82eload ' wu800 indexu82ephpu800 title ' encodeuricomponent extrajs '&action rawu800&ctype text javascript' ; else mwu800u82enotify 'only pages from theu800 mediawiki namespace areu800 allowed.' title 'invalid withjs value' ; ; ** * opening preloadu82ejsu800 tou800 addu800 interactive training keys * mwu800u82eloaderu82eusing "mediawikiu82eutil" function ifu800 mwu800u82eutilu82egetparamvalue "preload" importscript "mediawiki preloadedu82ejsu800" ; ; ** * collapsible tables; reimplemented with mwu800 collapsible * styling isu800 also inu800 place tou800 avoid fouc * * allows tables tou800 beu800 collapsed showing only theu800 header. seeu800 help collapsing . * version 3u800u82e0u800u82e0u800 2018 05u800 20u800 * source * author user ru800. koot * author user krinkle * author user thedj * deprecated since mediawiki 1u800u82e20u800 useu800 class "mwu800 collapsible" instead which * isu800 supported inu800 mediawiki core. shimmable since mediawiki 1u800u82e32u800 * * param jquery content * function makecollapsiblemwcollapsible content varu800 tables content .find 'tableu82ecollapsible notu800 .mwu800 collapsible ' .addclass 'mwu800 collapsible' ; .each tables function index table mwu800u82elogu800u82ewarn 'this page isu800 using theu800 deprecated class collapsible. please replace itu800 with mwu800 collapsible.' ; ifu800 table .hasclass 'collapsed' table .addclass 'mwu800 collapsed' ; mwu800u82elogu800u82ewarn 'this page isu800 using theu800 deprecated class collapsed. please replace itu800 with mwu800 collapsed.' ; ; ifu800 tablesu82elength 0u800 mwu800u82eloaderu82eusing 'jqueryu82emakecollapsible' .then function tablesu82emakecollapsible ; ; mwu800u82ehook 'wikipageu82econtent' .addu800 makecollapsiblemwcollapsible ; ** * addu800 support tou800 mwu800 collapsible foru800 autocollapse innercollapse andu800 outercollapse * * maintainers thedj * function mwcollapsiblesetup collapsiblecontent varu800 element toggle autocollapsethreshold 2u800; .each collapsiblecontent function index element element element ; ifu800 elementu82ehasclass 'collapsible' elementu82efind 'tru800 first thu800 first' .prepend elementu82efind 'tru800 first * .mwu800 collapsible toggle' ; ifu800 collapsiblecontentu82elength autocollapsethreshold && elementu82ehasclass 'autocollapse' elementu82edata 'mwu800 collapsible' .collapse ; else ifu800 elementu82ehasclass 'innercollapse' ifu800 elementu82eparents '.outercollapse' .length 0u800 elementu82edata 'mwu800 collapsible' .collapse ; because ofu800 colored backgrounds style theu800 link inu800 theu800 text color tou800 ensure accessible contrast toggle elementu82efind '.mwu800 collapsible toggle' ; ifu800 toggleu82elength make theu800 toggle inherit text color ifu800 toggleu82eparent 0u800 .styleu82ecolor toggleu82efind 'au800' .cssu800 'color' 'inherit' ; ; mwu800u82ehook 'wikipageu82ecollapsiblecontent' .addu800 mwcollapsiblesetup ; ** * dynamic navigation bars experimental * * description seeu800 wikipedia navframe . * maintainers unmaintained * varu800 collapsecaption 'u8d986u8d987u8d981u8d8aau8d986'; varu800 expandcaption 'u8d986u8d985u8d8a7u8db8cu8d8b4'; setu800 upu800 theu800 words inu800 your language varu800 navigationbarhide ' ' collapsecaption ' '; varu800 navigationbarshow ' ' expandcaption ' '; ** * shows andu800 hides content andu800 picture ifu800 available ofu800 navigation bars. * * param number indexnavigationbar theu800 index ofu800 navigation baru800 tou800 beu800 toggled * param jqueryu82eevent event event object * return boolean * function togglenavigationbar indexnavigationbar event varu800 navtoggle documentu82egetelementbyid 'navtoggle' indexnavigationbar ; varu800 navframe documentu82egetelementbyid 'navframe' indexnavigationbar ; varu800 navchild; ifu800 navframe navtoggle return false; ifu800 shown nowu800 ifu800 navtoggleu82efirstchildu82edata navigationbarhide foru800 navchild navframeu82efirstchild; navchild null; navchild navchildu82enextsibling ifu800 navchild .hasclass 'navcontent' navchildu82estyleu82edisplay 'none'; navtoggleu82efirstchildu82edata navigationbarshow; ifu800 hidden nowu800 else ifu800 navtoggleu82efirstchildu82edata navigationbarshow foru800 navchild navframeu82efirstchild; navchild null; navchild navchildu82enextsibling ifu800 navchild .hasclass 'navcontent' navchildu82estyleu82edisplay 'block'; navtoggleu82efirstchildu82edata navigationbarhide; eventu82epreventdefault ; ** * adds show hide button tou800 navigation bars. * * param jquery content * function createnavigationbartogglebutton content varu800 ju800 navchild navtoggle navtoggletext iscollapsed indexnavigationbar 0u800; iterate over allu800 elements varu800 divs contentu82efind 'divu800u82enavframe notu800 .mwu800 collapsible ' ; divsu82eeach function iu800 navframe indexnavigationbar ; navtoggle documentu82ecreateelement 'au800' ; navtoggleu82eclassname 'navtoggle'; navtoggleu82esetattribute 'idu800' 'navtoggle' indexnavigationbar ; navtoggleu82esetattribute 'href' '#' ; navtoggle .onu800 'click' .proxy togglenavigationbar null indexnavigationbar ; iscollapsed navframe .hasclass 'collapsed' ; ** * check ifu800 anyu800 children areu800 already hidden. this loop isu800 here foru800 backwards compatibility * theu800 oldu800 wayu800 ofu800 making navframes start outu800 collapsed wasu800 tou800 manually addu800 style "display none" * tou800 allu800 theu800 navpic navcontent elements. since this wasu800 badu800 foru800 accessibility nou800 wayu800 tou800 make * theu800 content visible without javascript support theu800 newu800 recommended wayu800 isu800 tou800 addu800 theu800 class * "collapsed" tou800 theu800 navframe itself just like with collapsible tables. * foru800 navchild navframeu82efirstchild; navchild null && iscollapsed; navchild navchildu82enextsibling ifu800 navchild .hasclass 'navpic' navchild .hasclass 'navcontent' ifu800 navchildu82estyleu82edisplay 'none' iscollapsed true; ifu800 iscollapsed foru800 navchild navframeu82efirstchild; navchild null; navchild navchildu82enextsibling ifu800 navchild .hasclass 'navpic' navchild .hasclass 'navcontent' navchildu82estyleu82edisplay 'none'; navtoggletext documentu82ecreatetextnode iscollapsed navigationbarshow navigationbarhide ; navtoggleu82eappendchild navtoggletext ; find theu800 navhead andu800 attach theu800 toggle link must beu800 this complicated because mozu800 mozu800'su800 firstchild handling isu800 borked foru800 ju800 0u800; ju800 elements * varu800 divs documentu82egetelementsbytagname "divu800" ; foru800 varu800 iu800 0u800; navframe divs iu800 ; iu800 * ifu800 found au800 navigation baru800 * ifu800 navframe .hasclass "navframe" indexnavigationbar ; varu800 navtoggle documentu82ecreateelement "au800" ; navtoggleu82eclassname "navtoggle"; navtoggleu82esetattribute "idu800" "navtoggle" indexnavigationbar ; navtoggleu82esetattribute "href" "#" ; navtoggle .onu800 "click" .proxy windowu82etogglenavigationbar window indexnavigationbar ; varu800 iscollapsed navframe .hasclass "collapsed" ; ** * check ifu800 anyu800 children areu800 already hidden. this loop isu800 here foru800 backwards compatibility * theu800 oldu800 wayu800 ofu800 making navframes start outu800 collapsed wasu800 tou800 manually addu800 style "display none" * tou800 allu800 theu800 navpic navcontent elements. since this wasu800 badu800 foru800 accessibility nou800 wayu800 tou800 make * theu800 content visible without javascript support theu800 newu800 recommended wayu800 isu800 tou800 addu800 theu800 class * "collapsed" tou800 theu800 navframe itself just like with collapsible tables. * foru800 navchild navframeu82efirstchild; navchild null && iscollapsed; navchild navchildu82enextsibling ifu800 navchild .hasclass "navpic" navchild .hasclass "navcontent" ifu800 navchildu82estyleu82edisplay "none" iscollapsed true; ifu800 iscollapsed foru800 navchild navframeu82efirstchild; navchild null; navchild navchildu82enextsibling ifu800 navchild .hasclass "navpic" navchild .hasclass "navcontent" navchildu82estyleu82edisplay "none"; varu800 navtoggletext documentu82ecreatetextnode iscollapsed navigationbarshow navigationbarhide ; navtoggleu82eappendchild navtoggletext ; * find theu800 navhead andu800 attach theu800 toggle link must beu800 this complicated because mozu800"su800 firstchild handling isu800 borked * foru800 varu800 ju800 0u800; ju800 0u800 '#mwu800 input wpsubject' .parents 'tru800' .before ' u8d984u8d8b7u8d981u8d8a7u8d98b u8d8b9u8d8a8u8d8a7u8d8b1u8d8aa wikipedia eu800 mail u8e2808cu8d8b1u8d8a7 u8d8a8u8d8a7 u8db8cu8daa9 u8d8b9u8d986u8d988u8d8a7u8d986 u8d985u8d986u8d8a7u8d8b3u8d8a8 u8d8acu8d8a7u8db8cu8daafu8d8b2u8db8cu8d986 u8daa9u8d986u8db8cu8d8af ' ; ; make refrence number that youu800 clicked onu800 bold foru800 proper navigation author user ladsgroup 'supu800u82ereference' .click function varu800 citeid this .attr 'idu800' ; 'supu800 au800 href "#' citeid '" ' .cssu800 'color' '#2a4b8d' .cssu800 'font weight' 'bold' ; 'supu800 au800 href "#' citeid '" ' .click function this .cssu800 'color'   .cssu800 'font weight'   ; ; ; hide theu800 fileexporter portlet link ifu800 theu800 file isu800 notu800 free content function ifu800 '#cau800 fileexporter' .length 1u800 & mwu800u82econfigu82egetu800 'wgcategories .filter 'u8d985u8d8adu8d8aau8d988u8db8cu8d8a7u8d8aa u8d8bau8db8cu8d8b1 u8d8a2u8d8b2u8d8a7u8d8af' 'u8d8aau8d8b5u8d988u8db8cu8d8b1u8d987u8d8a7u8db8c u8d8a8u8d8a7 u8d985u8d986u8d8a8u8d8b9 u8d986u8d8a7u8d985u8d8b9u8d984u8d988u8d985' 'u8d8aau8d8b5u8d988u8db8cu8d8b1u8d987u8d8a7u8db8c u8d8a8u8d8a7 u8d9beu8d8afu8db8cu8d8afu8d8a2u8d988u8d8b1 u8d986u8d8a7u8d985u8d8b4u8d8aeu8d8b5' .length 0u800 '#cau800 fileexporter' .hide ; ; function updateuserscriptwarning msgu800 newmsg return function varu800 userscript ' wiki special mypage ' mwu800u82econfigu82egetu800 'skin' '.jsu800'; varu800 commonscript ' wiki special mypage commonu82ejsu800'; mwu800u82enotify ' ' .html please translate tou800 farsi 'oneu800 ofu800 theu800 scripts youu800 areu800 running isu800 broken andu800 using au800 deprecated function ' msgu800 ' . please check your skin scripts andu800 common scripts tou800 update theu800 reference tou800' newmsg 'tou800 restore your script.' type 'error' ; ; 