Skip to content

Commit

Permalink
Updating sitewide JavaScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 5, 2025
1 parent 6c32638 commit 99ba3e0
Show file tree
Hide file tree
Showing 74 changed files with 18,463 additions and 6,827 deletions.
146 changes: 146 additions & 0 deletions dist/avatareclipse/Common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
importArticles({
type: "script",
articles: [
"w:dev:ShowHide/code.js", /* Collapsible elements and tables */
"w:dev:PurgeButton/code.js", /* Add "purge" option to page controls */
"w:dev:DisableArchiveEdit/code.js", /* Discourage/disable the editing of talk page archives */
"w:dev:Countdown/code.js", /* Countdown clock */
"w:dev:ReferencePopups/code.js", /* Reference Popups */
"MediaWiki:Common.js/imports.js", /* UserTags and AjaxRC */
"MediaWiki:Common.js/randompagelink.js", /* Special:Random/main link appended to the "On the Wiki" navigation menu */
"MediaWiki:Common.js/parentpage.js", /* Parent page link appended to the "On the Wiki" navigation menu */
"MediaWiki:Common.js/insertusername.js", /* User name replace for Template:USERNAME */
"MediaWiki:Common.js/disableforumedit.js", /* Discourage/disable the editing of forum archives */
"MediaWiki:Common.js/disablecommentsblogs.js", /* Disable blog comments on old blog posts */
"MediaWiki:Common.js/disablecomments.js", /* Disable comments for specified pages at discretion */
"MediaWiki:Common.js/wallgreetingbutton.js", /* Add a button to edit Message Wall Greeting */
"MediaWiki:Common.js/socialmedia.js", /* Add social media buttons to blog posts */
// "MediaWiki:Common.js/addnavlinks.js", /* Add "about us" and IRC links to "On the Wiki" menu */
"MediaWiki:Common.js/icons.js", /* Adds icons to page header bottom border */
"MediaWiki:Common.js/filluploadform.js", /* Fills the summary field in upload form with imagebox */
"MediaWiki:Common.js/hubfix.js", /* Temporary fix for Wikia hubs: Gaming > Entertainment */
"MediaWiki:Common.js/customizeforums.js", /* Wikia forum feature changes (possibly more to come) */
"MediaWiki:Common.js/fanonmodule.js", /* Create WikiaRail element to advertise the fanon portal */
"MediaWiki:Common.js/votesfordeletion.js", /* Javascript for the VfD page */
"MediaWiki:Common.js/fanonsubscriptionmodule.js", /* Tool used to automate mass-posting on message walls with an easy UI. */
"MediaWiki:Common.js/fanonwordmarklink.js", /* Wordmark in fanon namespace links to the fanon main page */
"MediaWiki:Common.js/createfanonfix.js", /* Fixes problems with the "Create fanon main page" feature on [[Avatar Wiki:Create fanon page]] */
"MediaWiki:Common.js/slider.js", /* "Slider" header for main page */
"MediaWiki:Common.js/masterblogprepend.js", /* Trial system for prepending blogs on the listing for Avatar news */
"MediaWiki:Common.js/JsTabs.js", /* Used for the function of [[Template:JsTabs]] */
"MediaWiki:Common.js/Accordion.js", /* Used for the function of [[Template:Accordion]] */
]
});

/* Custom edit buttons for source mode
* by: [[User:Thailog|Thailog]]
*/

if ((wgAction == 'submit' || wgAction == 'edit') && mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/marvel_dc/images/2/29/Character_Button.png",
"speedTip": "Insert character infobox template",
"tagOpen": "\{\{Character infobox\r| nation = ",
"tagClose": "\r| image = \r| name = \r| nationality = \r| age = \r| gender = \r| hair = \r| skincolor = \r| skintype = \r| allies = \r| enemies = \r| weapon = \r| fightingstyle = \r| profession = \r| position = \r| affiliation = \r| appearance = \r| lastappearance = \r| voice = \r| more = \r\}\}",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/0/0c/LoK_Button.png",
"speedTip": "Insert an appearances section for Legend of Korra characters",
"tagOpen": "=== ''The Legend of Korra'' ===\r==== Book Three: Change (易) ====\r{{Appear|2|",
"tagClose": "}}",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/__cb20120415191112/avatar/images/2/25/Cite_ep_Button.png",
"speedTip": "Episode/issue reference tag",
"tagOpen": "<ref name=\"\">{{Cite episode|2|3",
"tagClose": "}}</ref>",
"sampleText": "number"};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/d/dc/Image_Button.png",
"speedTip": "Insert Imagebox template",
"tagOpen": "\{\{Imagebox\r| description = ",
"tagClose": "\r| film = \r| series = \r| season = \r| episode = \r| source = \r| origin = \r| cats = \r| license = \r\}\}",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/1/1d/Copyrights_needed_Button.png",
"speedTip": "Uncredited image tag",
"tagOpen": "\{\{subst:Unknown/ukn|",
"tagClose": "}}",
"sampleText": "both"};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/4/4d/Support_Button.png",
"speedTip": "Support",
"tagOpen": "{{Support}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/9/9f/Oppose_Button.png",
"speedTip": "Oppose",
"tagOpen": "{{Oppose}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/7/7e/Neutral_Button.png",
"speedTip": "Neutral",
"tagOpen": "{{Neutral}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/a/a5/Keep_Button.png",
"speedTip": "Vote to keep",
"tagOpen": "{{Vote keep}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/3/3c/Delete_Button.png",
"speedTip": "Vote to delete",
"tagOpen": "{{Vote delete}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/4/4d/Merge_Button.png",
"speedTip": "Vote to merge",
"tagOpen": "{{Vote merge}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/b/b3/Done_Button.png",
"speedTip": "Done",
"tagOpen": "{{Done}} ",
"tagClose": "",
"sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://images.wikia.nocookie.net/avatar/images/f/fd/Not_Done_Button.png",
"speedTip": "Not done",
"tagOpen": "{{Not done}} ",
"tagClose": "",
"sampleText": ""};
}

/* Auto updating recent changes opt-in
* See w:c:dev:AjaxRC for info & attribution
*/

/* Auto Refresh */
AjaxRCRefreshText = 'Refresh';
AjaxRCRefreshHoverText = 'Automatically refresh the page';
ajaxPages = ["Special:RecentChanges","Special:WikiActivity"];
importScriptPage('AjaxRC/code.js', 'dev');

/* Collapsible classes
* See w:c:dev:ShowHide for info and attribution
*/

importScriptPage('ShowHide/code.js', 'dev');
File renamed without changes.
8 changes: 4 additions & 4 deletions dist/blox-fruits/GachaCalc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function createFormula(containerId, formulaNumber) {
var inputRange = document.createElement('input');
inputRange.type = 'number';
inputRange.min = '0';
inputRange.max = '2550';
inputRange.max = '2600';
inputRange.value = '50';
inputRange.placeholder = 'Player Level';

Expand All @@ -27,8 +27,8 @@ function createFormula(containerId, formulaNumber) {
value = 0;
} else if (value < 0) {
value = 0;
} else if (value > 2550) {
value = 2550;
} else if (value > 2600) {
value = 2600;
}
inputRange.value = value;
calculateResult(value, resultDiv, formulaNumber);
Expand All @@ -41,7 +41,7 @@ function calculateResult(value, resultDiv, formulaNumber) {
result = 0;
resultDiv.textContent = 'Level is too low!';
}
if (value > 49 && value < 2551) {
if (value > 49 && value < 2601) {
if (formulaNumber === 1) {
result = (value - 1) * 150 + 25000;
} else if (formulaNumber === 2) {
Expand Down
7 changes: 7 additions & 0 deletions dist/continued-exe/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ document.getElementById("spoilers_image").addEventListener("click", function() {
$('#spoilers').fadeOut(400, function () {
this.style.display = "none";
});
});

importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:FastBlock.js',
]
});
128 changes: 128 additions & 0 deletions dist/continued-exe/ProfileJoinDates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
//Credit goes to the Sonic Wiki Zone https://sonic.fandom.com/wiki/MediaWiki:ProfileJoinDates.js
/*Display first post date and first edit date on user profiles*/
/*By @Luma.dash*/
mw.loader.using(['mediawiki.api', 'mediawiki.util']).then(function(){
var $newul,
drivingObj = {
callForumInfo: function(id){
$.get(mw.config.get('wgScriptPath') + '/wikia.php', {
controller: "DiscussionContribution",
method: "getPosts",
userId: id,
format: "json"
}).then(function (data) {
if (data._links.last === undefined) {
}
if (data._links.first === undefined){
return;
}
drivingObj.getFirstPost(data._links.last === undefined ? data._links.first[0].href : data._links.last[0].href).then(function (data) { //getFirstpost on discussions
var postsLength = data._embedded["doc:posts"].length;
var post = data._embedded["doc:posts"][postsLength - 1]; //get last post (first in date)
postDate = drivingObj.getPostDate(post.creationDate.epochSecond);
postDateToString = postDate.toISOString().split('T')[0];
postHref = "/f/p/" + post.threadId + "/r/" + post.id;
drivingObj.populateProfileCommentor(postDateToString, postHref);
})
.catch(function(e){
console.log(e);
});
}).catch(function(e){
console.log(e);
})

},
callEditorInfo: function(username) {
var params = {
action: "query",
format: "json",
list: 'usercontribs',
ucuser: username,
ucdir: 'newer'
},
api = new mw.Api();
api.get(params).then(function (data) {
var firstEdit = data.query.usercontribs[0];
if (firstEdit === undefined )
return
drivingObj.populateProfileEditor(firstEdit);
})
.catch(function (e){
console.log(e);
})
},
populateProfileEditor: function(data) {
var $liEdit,
$anchorEdit;
$anchorEdit = $('<a href ="/wiki/' + data.title + '?diff=' + data.revid + '">' + data.timestamp.split('T')[0] + '</a>')
$liEdit = $('<li class = "editDate"><p>Joined Wiki since: </p>' + '</li>');
$liEdit.find('p').append($anchorEdit);
$newul.append($liEdit);
},
populateProfileCommentor: function(date, href) {
var $liComment,
$anchorcomment;
$anchorcomment = $('<a href ="' + href + '">' + date + '</a>')
$liComment = $('<li class = "postDate"><p>Joined Forum since: </p>' + '</li>');
$liComment.find('p').append($anchorcomment);
$newul.append($liComment);
},
getFirstPost: function(href) { //ajax call to get first post
return $.get(href);
},
getPostDate: function(epochDate) { //convert epoch to date
var d = new Date(0);
d.setUTCSeconds(epochDate);
return d;
},
isNotUserPage: function() {
return (mw.config.get("wgCanonicalNamespace") !== "User" || (mw.config.get("wgCanonicalNamespace") === "User" && mw.config.get("wgTitle").includes("/") === true));
},
isNotMessageWall: function(){
return (mw.config.get("wgCanonicalNamespace") !== "Message_Wall");
},
isNotUserBlog: function(){
return (mw.config.get("wgCanonicalNamespace") !== "User_blog" || (mw.config.get("wgCanonicalNamespace") === "User_Blog" && mw.config.get("wgTitle").includes("/") === true));
},
isNotContributions: function(){
return (mw.config.get("wgCanonicalNamespace") !== "Special" || mw.config.get("wgTitle").includes("Contributions/") === false);
},
isNotProfileActivity: function(){
return (mw.config.get("wgCanonicalNamespace") !== "Special" || mw.config.get("wgTitle").includes("UserProfileActivity/") === false)
},
getUserName: function(){
return mw.config.get('profileUserName');
},
run: function (){
window.editorPostInfo = true;
var $identityBox = $('.user-identity-box__info');
$newul = $('<ul class = "moreInfo">');
$identityBox.append($newul);
new mw.Api().get({ //get id to run the functions
action : "query",
list: 'users',
ususers: drivingObj.getUserName(),
format: 'json',
}).then(function(data) {
drivingObj.callEditorInfo(drivingObj.getUserName());
drivingObj.callForumInfo(data.query.users[0].userid);
}).catch(function(e){
console.log(e);
});
}
}
if (drivingObj.isNotUserPage() === true && drivingObj.isNotMessageWall() === true && drivingObj.isNotUserBlog() === true && drivingObj.isNotContributions() === true && drivingObj.isNotProfileActivity() === true)
return;
if (window.editorPostInfo === true)
return;
else {
var checkProfileShowed = function (){
if (!$('.user-identity-box').length) {
setTimeout(checkProfileShowed, 500);
}
else
drivingObj.run();
}
checkProfileShowed();
}
});
4 changes: 1 addition & 3 deletions dist/de.backrooms/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ mw.hook("wikipage.content").add(function () {
$("span.import-css").each(function () {
mw.util.addCSS($(this).attr("data-css"));
});
});

$('.keymaster-redirect').append('<script> window.location.href = "https://backrooms-convergence.fandom.com/wiki/The_Keymaster/de" </script>')
});
1 change: 0 additions & 1 deletion dist/dev/AddLinksToWikiDropdown.js

This file was deleted.

38 changes: 0 additions & 38 deletions dist/dev/AppleMusicWidget.js

This file was deleted.

Loading

0 comments on commit 99ba3e0

Please sign in to comment.