Neidio i'r cynnwys

Defnyddiwr:Jim Carter/Adminhelper.js

Oddi ar Wicipedia

Nodyn: Ar ôl cyhoeddi, efallai y bydd rhaid i chi fynd heibio celc eich porwr er mwyn gweld y newidiadau.

  • Firefox / Safari: Pwyswch Shift wrth glicio Adnewyddu / Reload, neu bwyswch naill ai Ctrl-F5 neu Ctrl-R (⌘-R ar Mac);
  • Google Chrome: Pwyswch Ctrl-Shift-R (⌘-Shift-R ar Mac)
  • Edge: Pwyswch Ctrl wrth glicio Adnewyddu / Refresh, neu bwyswch Ctrl-F5.
if( $( ".sysop-show" ).length > 0){ $( '#p-logo a' ).css({ 'background-image': 'url(//upload.wikimedia.org/wikipedia/commons/9/9c/Wikipedia-logo-v2-admin.svg)', 'background-size': '135px 155px' }); var listStyle = mw.util.addPortletLink( 'p-cactions', '#', 'O.o', 'pt-admin_eye', 'View page as an admin', null, null ); $( listStyle ).click(function ( e ) { e.preventDefault(); /*, 'block' );*/$( 'div.sysop-show, p.sysop-show' ).css( 'display',function (i, val) { return val === "block" ? "" : "block"; }); /*, 'inline' );*/$( 'span.sysop-show, small.sysop-show' ).css( 'display',function (i, val) { return val === "inline" ? "" : "inline"; }); /*, 'table' );*/$( 'table.sysop-show' ).css( 'display',function (i, val) { return val === "table" ? "" : "table"; }); /*, 'list-item' );*/$( 'li.sysop-show' ).css( 'display',function (i, val) { return val === "list-item" ? "" : "list-item"; }); /* Toggle the link */$( 'li#pt-admin_eye a' ).html(function (i, val) { return val === "O.O" ? "o.o" : "O.O"; }); /* Toggle the description */$( 'li#pt-admin_eye a' ).attr( 'title',function (i, val) { return val === "View page as an admin" ? "View page as a user" : "View page as an admin"; }); }); }else { /* Do nothing */}