×
Create a new article
Write your page title here:
We currently have 3,602 articles on DC Multiverse Wiki. Type your article name above or create one of the articles listed here!



    DC Multiverse Wiki

    User:TheDemon08/cosmos.js: Difference between revisions

    Content added Content deleted
    m (Carpe Universum moved page User:TheDemon08/wikia.js to User:TheDemon08/common.js without leaving a redirect)
    No edit summary
     
    (9 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 ) {
    //So we don't have to always uncheck it when moving a page
    mw.loader.load( '/MediaWiki:TagRightsManagement.js?action=raw&ctype=text/javascript' );
    $(document).ready(function() {
    }
    $('input#wpLeaveRedirect').removeAttr('checked');
    if ( $( '#mw-content a[href*="/Special:UpdateProfile"]' ).length > 0 === true ) {
    });
    $( '#profile-top, #mw-content #cosmos-articleHeader-actions' ).hover( function () {
    $(function() {
    $( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'visible' );
    var actions = mw.config.get("wgWikiaPageActions"),
    }, function () {
    oldbtn = $(".UserProfileActionButton"),
    $( '#mw-content #cosmos-articleHeader-actions' ).css( 'visibility', 'hidden' );
    masthead = $(".user-identity-box-edit");
    });

    }
    function getAction(id) {
    mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
    return actions.filter(function(action){return action.id === "page:"+id})[0]
    mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/NullEdit.js&action=raw&ctype=text/javascript');
    }

    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-dropdowntoggle")
    .append(
    $("<span>").attr({
    "class": "dev-wds-icon",
    "id": "dev-wds-icons-dropdown-tiny"
    })
    ),
    $("<div>")
    .attr("class", "wds-dropdowncontent 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 05:14, 24 June 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' );
        });
    }
    mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
    mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/NullEdit.js&action=raw&ctype=text/javascript');
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • IC228 • 2 days ago
  • IC228 • 3 days ago
  • IC228 • 4 days ago
  • IC228 • 4 days ago
  • Welcome to the DC Multiverse Wiki


    Cookies help us deliver our services. By using our services, you agree to our use of cookies.