MediaWiki:Gadget-edit-ingres.js

Fra Wikipedia, den frie encyklopedi

Merk: Etter publisering vil det kanskje være nødvendig å slette mellomlageret i nettleseren din for å se endringene.

  • Firefox / Safari: Hold Shift mens du klikker på Oppdater, eller trykk enten Ctrl+F5 eller Ctrl+R (⌘+R på Mac)
  • Google Chrome: Trykk Ctrl+Shift+R (⌘+Shift+R på Mac)
  • Internet Explorer / Edge: Hold Ctrl mens du trykker på Oppdater eller trykk Ctrl+F5
  • Opera: Ttrykk Ctrl+F5.
(function(){
	var ns = mw.config.get( 'wgNamespaceNumber' );
	if (
		ns >= 0 &&
		ns % 2 === 0 &&
		mw.config.get( 'wgIsArticle' ) &&
		mw.config.get( 'wgIsProbablyEditable' ) &&
		mw.config.get( 'wgCurRevisionId' ) === mw.config.get( 'wgRevisionId' )
	) {
		mw.util.addPortletLink(
            /* id of the target portlet ("p-cactions", "p-personal", "p-navigation" or "p-tb") */
            /^(vector)$/.test(mw.user.options.get( 'skin' )) ? "p-views" : "p-cactions",
            /* link URL */
            mw.util.getUrl( mw.config.get( 'wgPageName' ), { action: 'edit', section: '0' } ),
            /* link text (will be automatically lowercased by CSS for p-cactions in Monobook) */
            /*/^(monobook)$/.test(mw.user.options.get( 'skin' )) ? "0" : "Ingress",*/
            ( mw.config.get( 'skin' ) === 'monobook' ? '0' : 'Rediger ingress' ),
            /* id of the new item, should be unique and preferably have the appropriate prefix ("ca-", "pt-", "n-" or "t-") */
            "t-edit-ingress",
            /* text to show when hovering over the link, without accesskey suffix */
            "Rediger innledende seksjon",
            /* accesskey to activate this link (one character, try to avoid conflicts) */
            null,
            /* the DOM node before which the new item should be added, should be another item in the same list */
            '#ca-addsection, #ca-history'
        );
	}
})();