User:M~enwiki/cleanup.js

// =============== CLEANUP ===============

function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function { if (oldonload) { oldonload; }     func; } } }

addLoadEvent( cleanup ); function cleanup{ var $=jQuery; $("#siteNotice, #siteSub").remove; //spam //$("#p-coll-create_a_book, #p-lang").remove; //books in sidebar $("#f-poweredbyico, #f-copyrightico").remove; //footer $("#footer").css("padding","0em"); }

// == CLEANUP THE EDITOR == addLoadEvent( cleanupEditing ); function cleanupEditing{ var $=jQuery; $(".previewnote").remove; var pagesizetext= $("#mw-edit-longpagewarning").text.replace("This page is ","").replace(" kilobytes long.","KB!"); if (pagesizetext.length>5) $("#contentSub").append( " [" + pagesizetext+"]" ); $("#mw-edit-longpagewarning").remove; $("#wpTextbox1").before($(".mw-editTools")); $("#wpSummaryLabel small").remove; $("#wpSummary").css("display","inline"); $("#wpSummaryLabel a").text("Summarize your edit:"); $(".editOptions label[for='wpMinoredit']").text("minor"); $(".editOptions label[for='wpWatchthis']").text("watch"); //$(".editOptions label").css("margin-left","-5px"); $(".editOptions").append($("#wpSave")); $(".editOptions").append($("#wpPreview")); $(".editOptions").append($("#wpDiff")); $(".editOptions .editHelp, .editButtons").remove; $("#wpSummary").attr("size","20").css("width","15em"); $(".editOptions br").remove; $("#editpage-copywarn, #editpage-copywarn2, #editpage-copywarn3").remove; $(" Please ensure that you understand the following: ").appendTo($("#editform")); $("") .append("Don't violate copyright. Submit your own work; don't paste content that someone else wrote.") .append("You irrevocably agree to release your contributions under the GFDL*.") .append("Other editors and readers will want to check the facts. Add a citation to anything you think is controversial. If you think that what you're adding is right but want someone to help you double check it, then write  after that sentence.") .append("When you hit submit, your changes will be added to Wikipedia. If you made a mistake, you can undo your edit by going to the revisions (history) tab at the top. To check that your changes will look the way you want them to, click preview. To see what you changed, click show changes. If you just want to experiment, try the sandbox.").append("If someone removes your edit, don't worry. Use the discussion page to discuss your edit with the other people editing the page.") .append("If you want more help...") .appendTo($("#editform")); if (window.location.href.indexOf(".js&action=") != -1) { $("#pleasenoteedit") .prepend($("").append($("#jswarning .mbox-text").html).css("background","#ffcccc")) .prepend($("").append($("#userjspreview .mbox-text b, #usercssjsyoucanpreview .mbox-text").html).css("background","#ccffcc")) $("#userjspreview, #usercssjsyoucanpreview").remove; $("#jswarning").remove; $("#wikiPreview").remove; }	var $children = $(".templatesUsed ul li").wrapInner(" ").children("span"); if ($children.length>0) $children.appendTo( $(" Transcuded: ").appendTo($("#editform")) ); $(".templatesUsed").html("").remove; }

// == CLEANUP THE CHROME == // onload.... function cleanupChrome { // rgb(0, 102, 153); var $=jQuery; $("#content").prepend(" "); $("#content").before($("<div id='fakeheader' style='border-bottom:1px solid rgb(170,170,170);background:white;padding:.3em 1em;'> ")); $("#pageactions").append($(".topicon").children.children.css("margin-right","4px") ); $("#pageactions") .append($("#p-cactions a[accesskey='c']")).append(" · ") .append($("#ca-edit a")).append(" · ") .append($("#ca-history a").text("Revisions")).append(" · ") .append($("#ca-talk a")).append(" · ") .append($("#ca-watch a")).append(" · ") //.append($("#t-recentchangeslinked a").text("Similar")).append(" · ") .append($("#t-whatlinkshere a").text("WLH")); $("#fakeheader") .append($("#n-mainpage-description a")).append(" - ") //.append($("#n-contents a")).append(" · ") //.append($("#n-featuredcontent a").text("Featured")).append(" · ") .append($("#n-randompage a").text("Random")).append(" · ") //.append($("#n-currentevents a").text("News")).append(" · ") //.append($("#n-portal a").text("Community")).append(" -- ") //.append($("#n-recentchanges a").text("Changes")).append(" · ") .append($("#t-upload a").text("Upload")).append(" · ") .append($("#t-specialpages a").text("Special")); $("#userstuff") .append($("#pt-userpage a")).append(" · ") .append($("#pt-mytalk a").text("Messages")).append(" · ") .append($("#pt-watchlist a").text("Watchlist")).append(" · ") .append($("#pt-mycontris a").text("Log")).append(" · ") .append($("#pt-preferences a").text("Settings")).append(" · ") .append($("#pt-logout a").text("Logout")); $("#p-logo").remove; $("#p-cactions").remove; $("#p-navigation").remove; $("#p-interaction").remove; $("#p-tb").remove; $("#p-search").remove; $("#content") .css("border","1px solid rgb(170, 170, 170)") .css("margin","10px 10px 10px 10px"); } // ============== /CLEANUP ===============