Content added Content deleted
No edit summary |
(Update/normalise URLs) |
||
(181 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
mw.loader.load( '/MediaWiki:LastEdited.js?action=raw&ctype=text/javascript' ); |
|||
if ( $( '#mw-content .hgroup' ).length > 0 === true ) { |
|||
⚫ | |||
mw.loader.load( '/MediaWiki:TagRightsManagement.js?action=raw&ctype=text/javascript' ); |
|||
$('#WikiaRail').prepend('<a data-quiz="QFNYD2OG" data-type=4 href="https://www.quiz-maker.com/QFNYD2OG">Loading...</a>' ); |
|||
⚫ | |||
(function(i,s,o,g,r,a,m){var ql=document.querySelectorAll('A[quiz],DIV[quiz],A[data-quiz],DIV[data-quiz]'); if(ql){if(ql.length){for(var k=0;k<ql.length;k++){ql[k].id='quiz-embed-'+k;ql[k].href="javascript:var i=document.getElementById('quiz-embed-"+k+"');try{qz.startQuiz(i)}catch(e){i.start=1;i.style.cursor='wait';i.style.opacity='0.5'};void(0);"}}};i['QP']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//cdn.poll-maker.com/quiz-embed-v1.js','qp'); |
|||
if ( $( '#mw-content a[href*="/Special:UpdateProfile"]' ).length > 0 === true ) { |
|||
$( '#profile-top, #mw-content #cosmos-articleHeader-actions' ).hover( function () { |
|||
$( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'visible' ); |
|||
⚫ | |||
$( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'hidden' ); |
|||
}); |
}); |
||
⚫ | |||
$(function() { |
|||
var actions = mw.config.get("wgWikiaPageActions"), |
|||
oldbtn = $(".UserProfileActionButton"), |
|||
masthead = $(".user-identity-box-edit"); |
|||
function getAction(id) { |
|||
return actions.filter(function(action){return action.id === "page:"+id})[0] |
|||
⚫ | |||
function renderSVGs(wds) { |
|||
wds.render(".user-identity-box-edit .wds-button-group") |
|||
⚫ | |||
if(mw.config.get("wgNamespaceNumber") == 2 && oldbtn.length && masthead.length) { |
|||
importArticle({type: "style", article: "u:dev:MediaWiki:ModernProfile/EditButton.css"}) |
|||
oldbtn.remove(); |
|||
if(actions) { |
|||
var newbtn, drop, dropbtns = []; |
|||
var a_edit = getAction("Edit") |
|||
if(a_edit) { |
|||
newbtn = $("<a>").attr({ |
|||
"class": "wds-button wds-is-secondary wds-is-squished", |
|||
"id": "ca-edit", |
|||
"href": a_edit.href |
|||
}).append( |
|||
$("<span>").attr({ |
|||
"class": "dev-wds-icon", |
|||
"id": "dev-wds-icons-pencil-small" |
|||
}), |
|||
$("<span>").text(a_edit.caption) |
|||
) |
|||
} |
|||
["History", "Move", "Protect", "Delete"].forEach(function(id){ |
|||
var a = getAction(id); |
|||
if(a) dropbtns.push($("<li>").append($("<a>").attr("href", a.href).text(a.caption))) |
|||
}) |
|||
if(dropbtns.length) { |
|||
var dropcontent = $("<ul>").attr("class", "wds-list wds-is-linked") |
|||
drop = $("<div>").attr("class", "wds-dropdown").append( |
|||
$("<div>") |
|||
.attr("class", "wds-button wds-is-secondary wds-is-squished wds-dropdown__toggle") |
|||
.append( |
|||
$("<span>").attr({ |
|||
"class": "dev-wds-icon", |
|||
"id": "dev-wds-icons-dropdown-tiny" |
|||
}) |
|||
), |
|||
$("<div>") |
|||
.attr("class", "wds-dropdown__content wds-is-not-scrollable wds-is-right-aligned") |
|||
.append(dropcontent) |
|||
); |
|||
dropbtns.forEach(function(e){dropcontent.append(e)}) |
|||
} |
|||
masthead.html( |
|||
$("<div>") |
|||
.attr("class", "wds-button-group") |
|||
.css({"float": "right"}) |
|||
.append(newbtn, drop) |
|||
) |
|||
if(!window.dev || !window.dev.wds) { |
|||
mw.hook("dev.wds").add(renderSVGs); |
|||
importArticle({type: "script", articles: "u:dev:WDSIcons/code.js"}) |
|||
} else renderSVGs(window.dev.wds) |
|||
} |
|||
} |
|||
}); |
Latest revision as of 20:54, 17 May 2023
mw.loader.load( '/MediaWiki:LastEdited.js?action=raw&ctype=text/javascript' );
if ( $( '#mw-content .hgroup' ).length > 0 === true ) {
mw.loader.load( '/MediaWiki:TagRightsManagement.js?action=raw&ctype=text/javascript' );
}
if ( $( '#mw-content a[href*="/Special:UpdateProfile"]' ).length > 0 === true ) {
$( '#profile-top, #mw-content #cosmos-articleHeader-actions' ).hover( function () {
$( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'visible' );
}, function () {
$( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'hidden' );
});
}