User:KurwaAntics/global.js

// AjaxBatchDelete delay // batchDeleteDelay = 750;

// Import script files // importArticles({   type: "script",    articles: [        "w:c:dev:View_Source/code.js",        "w:c:dev:DisplayClock/code.js",        "w:c:dev:ReferencePopups/code.js",        "w:c:dev:FindAndReplace/code.js",        "w:c:dev:RevealAnonIP/usercode.js",        "w:c:dev:SkinSwitchButton/code.js",        "w:c:dev:FixSourcePages/code.js"    ] }); /* $(".WikiHeader div.buttons").css("width", "100%"); $(".WikiHeader div.buttons span a:hover").css("text-decoration", "underline"); $(".WikiHeader div.buttons span a:active").css("text-decoration", "underline");

$("nav.wikia-menu-button:nth-child(2)").hide; $(".wikia-button.comments.secondary").hide; $(".wikia-menu-button.contribute.secondary").hide; var x; if( window.location.href.indexOf('?') >= 0){ x = "&"; } else { x = "?"; } /* $(".WikiHeader div.buttons").append(   '  '+    // Edit whole page    'Edit'+    ' | '+    // View Source    'View source'+    ' | '+    // History    'View history'+    ' | '+    // Rename    'Move'+    ' | '+    // Talk / Comments    'Talk'+    ' | '+    // Protect    'Protect'+ ' | '+   // Protect 'Change protection'+ ' | '+   // Delete 'Delete'+ ' | '+   // Wiki navigation 'Edit wiki navigation</a>'+ ' '    );    */ $(".header-column.header-title").append( //Edit the section before TOC '<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" class="sprite edit-pencil">Edit</a>' );

$(".page-User_Yhynerson1 .mw-content-ltr.mw-content-text, .page-用戶_Yhynerson1 .mw-content-ltr.mw-content-text").prepend(' ')

// Wikia bar // $("ul.tools").append( '<li class="mytools menu">'+ '<i class="fa fa-bars"></i> Page actions</a>'+ '<ul id="my-tools-menu" class="tools-menu" style="left: 172.094px; right: auto; display: none;">'+ '<li class="overflow editpage">'+ '<i class="fa fa-pencil fa-fw"></i>  Edit</a>'+ '</li>'+ ' '+ '<i class="fa fa-code fa-fw"></i>  Source</a>'+ '</li>'+ ' '+ '<i class="fa fa-history fa-fw"></i>  History</a>'+ '</li>'+ '<li class="overflow move">'+ '<i class="fa fa-arrows-alt fa-fw"></i>  Move</a>'+ '</li>'+ '<li class="overflow talk-comments">'+ '<i class="fa fa-comments fa-fw"></i>  Talk</a>'+ '</li>'+ '<li class="overflow protect">'+ '<i class="fa fa-lock fa-fw"></i> Protect</a>'+ '</li>'+ '<li class="overflow unprotect">'+ '<i class="fa fa-unlock-alt fa-fw"></i> Change protection</a>'+ '</li>'+ '<li class="overflow delete">'+ '<i class="fa fa-trash fa-fw"></i> Delete</a>'+ '</li>'+ '<li class="overflow wikinavedit">'+ '<i class="fa fa-pencil fa-fw"></i> Edit wiki navigation</a>'+ '</li>'+ '</ul>'+ '</li>'+ '  Talk</a></li>'+ '  Settings</a></li>'+ '  </a>'+ //'<form class="mini-searchbox" style="float:right"><input class="mini-searchbox-input" placeholder="search" style="width:160px; margin:-4px 0"> '+ '<form name="searchbox" id="searchbox" class="searchbox" action="/wiki/Special:Search" style="float: right; ">'+ '<input class="searchboxInput" name="search" type="text" placeholder="Search..." style="width:48px; background:transparent; border:none; padding:0; height:14px !important; font-size: 12px; font-family: helvetica, arial, sans-serif;">'+ '<input type="submit" name="go" class="searchboxGoButton" value="Try exact match" style="display:none">'+ '<input type="submit" name="fulltext" class="searchboxSearchButton" value="Search full text" style="display:none">'+ ' '+ '</li>');

// Edit boolean // if( $(".wikia-button.comments.secondary").attr("href")===undefined){ $(".talk-comments").hide; } if( $("#ca-edit").attr("href")===undefined){ $(".editpage").hide; } if( $("#ca-move").attr("href")===undefined){ $(".move").hide; } if( $("#ca-protect").attr("href")===undefined){ $(".protect").hide; } if( $("#ca-unprotect").attr("href")===undefined){ $(".unprotect").hide; } if( $("#ca-delete").attr("href")===undefined){ $(".delete").hide; } if( $("a[data-id=wikinavedit]").attr("href")===undefined){ $(".wikinavedit").hide; }

// The search Bar // $("#WikiaBar .searchboxInput").focusin(function {   $("#WikiaBar .searchbox, #WikiaBar .searchboxInput").animate({"width":"200px"},300);    }).focusout(function {        if( $(this).val.length === 0 ) {            $("#WikiaBar .searchbox, #WikiaBar .searchboxInput").animate({"width":"48px"},300);        }    });

/* <form class="searchbox" action="/wiki/Special:Search"><input class="searchboxInput" placeholder="search" size="30"> searchbox*/

//#inputTarget是你input的ID /*$(".mini-searchbox-input").keypress(function(e){   code = (e.keyCode ? e.keyCode : e.which);   if (code == 13)    {        $(".mini-searchbox").submit;    } }); $(".mini-searchbox").submit(function {   var x = document.getElementsByClassName("mini-searchbox-input")[0].value;    window.location.assign("/wiki/Special:Search?search=" + x); }); /* '<form name="searchbox" id="searchbox" class="searchbox" action="/wiki/Special:Search" style="float: right; ">'+ '<input class="searchboxInput" name="search" type="text" placeholder="Search..." style="width:160px; margin:-4px 0">'+ '<input type="submit" name="go" class="searchboxGoButton" value="Try exact match" style="display:none">'+ '<input type="submit" name="fulltext" class="searchboxSearchButton" value="Search full text" style="display:none">'+ ' '+