Wikipedysta:PG/wp sk.js
Wygląd
Uwaga: aby zobaczyć zmiany po opublikowaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.
- Firefox / Safari: Przytrzymaj Shift podczas klikania Odśwież bieżącą stronę, lub naciśnij klawisze Ctrl+F5, lub Ctrl+R (⌘-R na komputerze Mac)
- Google Chrome: Naciśnij Ctrl-Shift-R (⌘-Shift-R na komputerze Mac)
- Edge: Przytrzymaj Ctrl, jednocześnie klikając Odśwież, lub naciśnij klawisze Ctrl+F5.
- Opera: Naciśnij klawisze Ctrl+F5.
( function()
{
function attachToSk()
{
//console.log( "Attaching to WP:SK" );
wp_sk.PGsk_cleanerWikiVaria = wp_sk.cleanerWikiVaria;
wp_sk.extension += "+[[Wikipedysta:PG|PGsk]]";
wp_sk.cleanerWikiVaria = function( str )
{
str = wp_sk.PGsk_cleanerWikiVaria( str );
str = str.replace( /format pdf\]/g, 'format PDF\]' );
str = str.replace( / (..)/g, ' \{\{lang\|$1\}\}' );
return str;
};
}
if ( typeof( wp_sk ) !== 'undefined' )
{
//console.log( "WP:SK is present" );
attachToSk();
}
else
{
//console.log( "WP:SK is not present" );
var timer;
var attemptsLeft = 600;
timer = window.setInterval( function()
{
if ( typeof( wp_sk ) !== 'undefined' )
{
attachToSk();
window.clearInterval( timer );
return;
}
attemptsLeft--;
if ( attemptsLeft < 0 )
{
//console.log( "WP:SK is not present, giving up" );
window.clearInterval( timer );
}
}, 100 );
}
} )();