-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c32638
commit 99ba3e0
Showing
74 changed files
with
18,463 additions
and
6,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.