Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/*
............Roranoa's JS.............
*/
// ============================================================
// Chat Hacks
// ============================================================
importScriptPage('User:Monchoman45/ChatHacks.js', 'c');
importScriptPage('User:Joeytje50/ChatPMs.js', 'c');
importScriptPage(('MessageBlocker/code.js', 'dev'), 'xiaolinpedia');
importScriptPage('MediaWiki:Chat.js/options.js', 'xiaolinpedia');
//Helper
function wikia() {
//Adds a style sheet
this.css = function (url) {
var node = document.createElement("link");
node.rel = url;
node.type = "text/css";
document.body.appendChild(node);
};
//Adds a script page
this.javascript = function (url) {
var node = document.createElement("script");
node.src = url;
node.type = "text/javascript";
document.body.appendChild(node);
};
}
//Initialize helper
var wikia = new wikia();
//Imp
//wikia.javascript("https://raw.github.com/PrincessPlatinum/ChatOptions/master/Options-Menu.js");
//wikia.javascript("http://community.wikia.com/wiki/User:Prince(ss)_Platinum/ChatRegex.js?action=raw");
/*Roranoa's chat hacks
importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:APIQuery.js&action=raw&ctype=text/javascript');
importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:B3.js&action=raw&ctype=text/javascript');
importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:WhamAPI.js&action=raw&ctype=text/javascript');
importScriptURI('http://c.wikia.com/index.php?title=User:Monchoman45/ChatHacks.js&action=raw&ctype=text/javascript');
*/
/* Chat options
var chatOptionsLoaded;
if (chatOptionsLoaded != 1){
chatOptionsLoaded = 1;
importScriptPage('MediaWiki:Chat.js/options.js','cod');
}
*/
/* Block Chat Messages
if (mw.config.get('wgPageName') === 'Special:Chat') {
$(function () {
"use strict";
function createUl(blockee) {
var isBlocked = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("blockee");
if (isBlocked === false) {
$('.regular-actions').after('<hr class="separator"></hr><ul><li class="ignore"><span class="icon"></span><span class="label">Block Messages</span></li></ul>');
} else {
$('.regular-actions').after('<hr class="separator"></hr><ul><li class="ignore blue"><span class="icon"></span><span class="label">Allow Messages</span></li></ul>');
}
$("li.ignore").click(function() { ignore(blockee); });
}
function ignore(blockee) {
var blockStyle;
var blockee = blockee;
var isBlocked = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("blockee");
var isMod = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("chat-mod");
if (isMod === false) {
if (isBlocked === false) {
$("li.ignore").addClass("blue");
blockStyle = document.createElement("style");
blockStyle.innerHTML = ("li[data-user='"+blockee+"']:not(.User){display: none;}");
blockStyle.setAttribute("id", "blockStyle-"+blockee);
document.head.appendChild(blockStyle);
$("#WikiChatList>li[data-user='"+blockee+"']").addClass("blockee");
$(".UserStatsMenu li.ignore>span.label").replaceWith("<span class='label'>Allow Messages</span>");
} else {
$("li.ignore").removeClass("blue");
blockStyle = document.getElementById("blockStyle-"+blockee);
blockStyle.parentNode.removeChild(blockStyle);
$("#WikiChatList>li[data-user='"+blockee+"']").removeClass("blockee");
$(".UserStatsMenu li.ignore>span.label").replaceWith("<span class='label'>Block Messages</span>");
}
} else {
var lastMsg = $('.Chat>ul>li:last-child');
var lastMsgIsAlert = lastMsg.hasClass("inline-alert");
if (lastMsgIsAlert === true) {
lastMsg.after("<li class='inline-alert continued' style='color:red'>You cannot block chat moderators, administrators, or Wikia staff members.</li>");
} else {
lastMsg.after("<li class='inline-alert' style='color:red'>You cannot block chat moderators, administrators, or Wikia staff members.</li>");
}
}
}
function createUlCall() {
var blockee = $(this).attr('data-user');
setTimeout(function() { createUl(blockee); }, 0);
}
$("#WikiChatList").on("click", "li.User", createUlCall);
var messageBlockerStyle = document.createElement("style");
messageBlockerStyle.innerHTML = ".UserStatsMenu .actions li.ignore .icon { background-image: url('http://images.wikia.com/dzy/images/8/81/Sprite-chat-ignore.png'); } .UserStatsMenu .actions li.ignore .icon { background-position: -0px 0; } .UserStatsMenu .actions li.ignore:hover .icon { background-position: -31px 0; } .UserStatsMenu .actions li.ignore.blue .icon { background-position: -67px 0; } .UserStatsMenu .actions li.ignore.blue:hover .icon { background-position: -98px 0; } #WikiChatList>li.blockee { background: #FFE6D8; !important } .ignore span.label { position: relative; bottom: 5px; left: 3px; }";
document.head.appendChild(messageBlockerStyle);
});
}
*/
/* cookie init */
function CheckCookie() {
if (readCookie('globalJS') === null) {
createCookie('globalJS', 'true', 99999);
}
if (skin == 'oasis') {
$('#AccountNavigation')
.prepend('<li><a onclick="ToggleGlobalJSCookie()" style="cursor:pointer; cursor:hand;"><img src="http://images3.wikia.nocookie.net/portalskin/images/2/20/Refresh_Icon.gif" style="margin-bottom:-4px;"> <span id="GlobalJSText">JS</span></a></li>');
}
}
addOnloadHook(CheckCookie);
function ToggleGlobalJSCookie() {
if (readCookie('globalJS') == 'true') {
createCookie('globalJS', 'false', 99999);
$('#GlobalJSText')
.html('Off');
} else {
createCookie('globalJS', 'true', 99999);
$('#GlobalJSText')
.html('On');
}
window.location.reload(true);
}
//When using this script, please remember to import chathacks too, and set your ping phrases to a long random string that will never be said in the chat, so that the logs won't show the red highlight.
//import this using importScript('User:Joeytje50/ChatLogger.js')
//To set an interval of submitting logs, put var logInterval = (amount of milliseconds); above the import. Default is 1 hour.
var logInterval = (120000);
importScript('User:Joeytje50/ChatLogger.js');
// ============================================================
// Imports
// ============================================================
importArticles({
type: 'script',
articles: [
// ...
'w:c:dev:SignatureCheck/code.js',
'w:c:dev:ListFiles/code.js',
'w:c:dev:RevealAnonIP/code.js',
'w:c:dev:View_Source/code.js',
'w:c:dev:EditIntroButton/code.js',
'w:c:dev:Thread Inspection/code.js',
'w:c:dev:FastOldImageDelete/code.js',
'w:c:dev:FixWantedFiles/code.js',
'w:c:dev:CacheCheck/code.js',
'w:c:dev:WHAM/code.js',
'w:c:dev:SkinSwitchButton/code.js',
'w:c:dev:FloatingToc/code.js',
'w:c:dev:AjaxBatchDelete/code.js',
'w:c:dev:AjaxUndo/code.js',
'w:c:dev:MiniComplete/code.js',
'w:c:dev:MessageBlocker_2/code.js',
'w:c:dev:Standard_Edit_Summary/code.js',
'w:c:dev:NoImageLightbox/code.js',
'w:c:dev:NullEditButton/code.js',
'u:dev:Message/code.js',
'w:c:dev:PowerPageMaker/code.js',
'u:dev:EntityConvert/code.js',
'u:dev:PageMakerPro/code.js',
// ...
]
});
importArticles({
type: "script",
articles: [
"w:dev:PurgeButton/code.js", /* Add "purge" option to page controls */
"w:c:community:User:LiaSakura/global.js/randompagelink.js", /* Special:Random > Special:Random/main in navigation */
"w:c:avatar:MediaWiki:Common.js/wallgreetingbutton.js", /* Add a button to edit Message Wall Greeting */
// HotCat
"w:c:answers:MediaWiki:Gadget-HotCat.js",
"w:dev:Message/code.js", /* Send a message to multiple users */
]
});
/*importScriptURI('http://roranoazorotest.wikia.com/wiki/MediaWiki:ChatToolbox.js?action=raw&ctype=text/javascript');
*/
importScriptPage("CategoryRenameAuto-update/code.js", "dev");
/* Code for custom edit buttons. */
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://t3.gstatic.com/images?q=tbn:ANd9GcQza3uE0tdEJosUO4VmfvHAfr8TkfsXD1IzBPLfAQcxterZAvd65A",
"speedTip": "Designs Team",
"tagOpen": "[http://onepiece.wikia.com/wiki/One_Piece_Encyclopedia:Designs_Team Designs Team]",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/66/Button_mort.png",
"speedTip": "sigbox",
"tagOpen": "{{User:Roranoa_zoro/Sigbox|",
"tagClose": "}}",
"sampleText": ""};
}
/*code*/
importArticles({
type: 'script',
articles: [
'u:dev:Code/code.js'
]
});
/*portable css pad*/
importArticles({
type: 'script',
articles: [
'u:dev:PortableCSSPad/code.js'
]
});
// AutoEditDropdown config - http://dev.wikia.com/wiki/AutoEditDropdown
window.AutoEditDropdownConfig = {
expandedAreaContribute: true,
expandedAreaEdit: false
};
importArticles({
type: 'script',
articles: [
'w:c:dev:AutoEditDropdown/code.js'
]
});
//Advanced Tools
$.getScript('https://raw.github.com/PrincessPlatinum/Ajax-Scripts/master/Advanced%20Tools.js');
//Import recent changes module
importScriptURI('https://raw.github.com/PrincessPlatinum/Ajax-Scripts/master/RecentChanges.js');
//Import AjaxUnsigned
importScriptURI('https://raw.github.com/PrincessPlatinum/Ajax-Scripts/master/Unsigned.js');
//custom side bar
importScriptURI('http://roranoazorotest.wikia.com/index.php?title=MediaWiki:CustomSidebar.js&action=raw&ctype=text/javascript');
/* Chat modifications */
importScriptPage('User:ToaMeiko/chat-global.js', 'c');
/* Auto Refresh */
AjaxRCRefreshText = 'Refresh';
AjaxRCRefreshHoverText = 'Automatically refresh the page';
ajaxPages = ["Special:RecentChanges", "Special:WikiActivity"];
importScriptPage('AjaxRC/code.js', 'dev');
/* Creates Back To Top Arrow In Footer */
var Speed = 5;
importScriptPage('BackToTopArrow/code.js', 'dev');
/* InactiveUsers */
InactiveUsers = {
months: 1
};
importScriptPage('InactiveUsers/code.js', 'dev');
/* AdvancedOasisUI */
window.AdvancedOasisUI = {
accountNavFollowedPages: true,
accountNavWatchlist: true,
categoryRedlink: true,
RCHeader: true,
DefaultSourceMode: true,
lightbox: false,
randomPageLimitedTo: '',
activity2RC: false,
userLang: true,
};
importScriptPage('AdvancedOasisUI/code.js', 'dev');
// ============================================================
// Random Scripts Taken From Various Places
// ============================================================
// <source lang="JavaScript">
// Adds an EditCount tab to the user namespace
$(function () {
var username = wgTitle.indexOf("Contributions/") != -1 ? wgTitle.replace("Contributions/", "") : wgTitle;
$('.tabs-container > ul.tabs')
.append('<li data-id="editcount"><a href="/wiki/Special:Editcount/' + username + '">Edit Count</a></li>');
});
// END Adds an EditCount tab to the user namespace
// </source>
/* Make Forum Talk Button Appear */
(function ($, mw) {
var title = mw.config.get('wgTitle'),
numcomments = 0;
if (mw.config.get('wgPageName')
.substring(0, 6) === 'Forum:') {
$('#WikiaPageHeader .wikia-menu-button')
.after(
'<a class="wikia-button comments secondary talk" href="/wiki/" ' +
'data-id="comment"> Talk<span class="commentsbubble"></span></a>'
);
$('a.talk')
.attr('href', '/wiki/Forum talk:' + title);
$.getJSON('/api.php?action=query&prop=revisions&titles=Forum talk:' +
title + '&rvlimit=max&format=json', function (data) {
for (var pageID in data.query.pages) break;
if (data.query.pages[pageID].revisions) {
numcomments = data.query.pages[pageID].revisions.length;
}
$('.talk .commentsbubble')
.text(numcomments);
});
}
}(jQuery, mediaWiki));
function FakeTalk() {
var sub = ['Talk', 'talk']; //pages to check
var on = false;
for (var i = 0; i < sub.length; i++) {
if (wgPageName == 'User:' + wgUserName + '/' + sub[i]) {
on = true;
break;
}
}
if (!on) {
xhr = new XMLHttpRequest();
xhr.open('GET', '/api.php?action=query&prop=info&titles=User:' + wgUserName + '/' + sub.join('|User:' + wgUserName + '/') + '&format=json', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
var pages = JSON.parse(this.responseText)
.query.pages;
for (var i in pages) {
if (i > 0 && pages[i].lastrevid > localStorage.getItem('msgwl_' + pages[i].title.substring(pages[i].title.indexOf('/') + 1))) {
if (skin == 'oasis') {
document.getElementById('WikiaFooter')
.getElementsByTagName('ul')[0].outerHTML += '<ul id="WikiaNotifications" class="WikiaNotifications"><li><div data-type="1"><a class="sprite close-notification"></a>You have <a href="/index.php?title=' + pages[i].title + '&redirect=no" title="' + pages[i].title + '">new messages</a>.</div></li></ul>';
} else {
document.getElementById('contentSub')
.outerHTML += '<div class="usermessage">You have <a href="/index.php?title=' + pages[i].title + '&redirect=no" title="' + pages[i].title + '">new messages</a> (<a href="/index.php?title=' + pages[i].title + '&diff=cur" title="' + pages[i].title + '">show most recent</a>).</div>';
}
}
}
}
};
xhr.send();
} else {
localStorage.setItem('msgwl_' + wgPageName.substring(wgPageName.lastIndexOf('/') + 1), wgCurRevisionId);
}
}
addOnloadHook(FakeTalk);
/* create a special "favorite wikis" for my user page in oasis, instead of the standard 4-links version */
if ((mw.config.get("wgPageName") == "User:Roranoa_zoro" || mw.config.get("wgPageName") == "User_talk:Roranoa_zoro" || mw.config.get("wgPageName") == "Message_Wall:Roranoa_zoro" || mw.config.get("wgPageName") == "User_blog:Roranoa_zoro" || mw.config.get("wgPageName") == "Special:Contributions/Roranoa_zoro" || mw.config.get("wgPageName") == "Special:Following") && mw.config.get("skin") == "oasis") {
// add a stylesheet (not using the standard global CSS pages)
$("head").append("<style type=\"text/css\">section#UserProfileMasthead #my-wikis > ul > li:nth-child(3n+0) > a { color: orange !important;}section#UserProfileMasthead #my-wikis > ul > li:nth-child(3n+1) > a { color: green !important;}</style>");
// add wiki links
$("section#UserProfileMasthead :not(.masthead-info-lower) ul.details").replaceWith("<div id=\"my-wikis\" style=\"width: 200px; height: 80px; padding: 10px; border-left: 1px solid black; border-right: 1px solid black; border-radius: 15px; direction: ; overflow-x: hidden; overflow-y: scroll; text-align: right;\">\
<ul style=\"margin-top: 0px; margin-left: 10px; list-style: none;\">\
<li><a href=\"http://onepiece.wikia.com/\">OnePiece</a></li>\
<li><a href=\"http://community.wikia.com/\">Community Central</a></li>\
<li><a href=\"http://shipoffools.wikia.com/\">Ship of Fools</a></li>\
<li><a href=\"http://kingdom-anime.wikia.com/\">Kingdom</a></li>\
<li><a href=\"http://roranoazorotest.wikia.com/\">Roranoa zoro Test</a></li>\
<li><a href=\"http://fairytail.wikia.com/\">Fairy Tail</a></li>\
<li><a href=\"http://dev.wikia.com/\">Dev Wiki</a></li>\
</ul>\
</div>");
}
//Special CSS controller
jQuery(function ($) {
if (mw.config.get('wgCanonicalSpecialPageName') === 'CSS') {
$(".css-editor").prepend("<span id='buttom-css' class='button'>100%</span>");
};
var countcss = 0;
$("#buttom-css").click(function () {
countcss += 1;
if (countcss == 1) {
$(this).text("Default");
$(".css-editor-wrapper").css("width", "100%");
$(".css-side-bar").css("display", "none");
$(".ace_gutter").css("display", "none");
$(".ace_scroller").css("left", "0px");
}
if (countcss == 2) {
$(this).text("100%");
$(".css-editor-wrapper").css("width", "auto");
$(".css-side-bar").css("display", "block");
$(".ace_gutter").css("display", "block");
$(".ace_scroller").css("left", "49px");
countcss = 0
}
});
});
//QQX
importScriptPage('QQX/code.js', 'dev');
importArticles({
type: 'script',
articles: [
// ...
'w:c:dev:ReferencePopups/code.js',
// ...
]
});