Wikipedysta:Wiktoryn/common.js
// obserwowane strony oznaczane na stronie kategorii [[Wikipedysta:Kaligula/js/watchCat.js]]
importScript('Wikipedysta:Kaligula/js/watchCat.js');
watchCat_pending = 'auto';
watchCat_changed = 'watched';
// przypisy szablon r
importScript("Wikipedysta:Matma Rex/prettyref.js");
// myNotepad – [[User:Vinne2/scripts/myNotepad]]
importScript('Wikipedysta:Vinne2/scripts/myNotepad.js');
// Lepsze WP:SK
var wp_sk_show_as_button = true; // pokazuj przycisk
var wp_sk_redir_enabled = true; // ajaksowe redirecty
var wp_sk_r_replace_enabled = false; // wyłącz usuwanie szablonów R
mw.loader.load('//pl.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedysta:ToSter/wpsk user.js');
mw.loader.load('//pl.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedysta:Malarz pl/wp sk.js');
// Skrypt usuwa wszystkie linki do dat w zaznaczeniu
var daty = new Object();
daty.zmiatajDaty = function() {
var input = document.getElementById( 'wpTextbox1' )
var orig = sel_t.getSelStr( input );
var str = orig;
str = str.replace( /\[\[(\d+)\]\]/g, '$1' );
str = str.replace( /\[\[(\d+)\|(.*?)\]\]/g, '$2' );
str = str.replace( /\[\[(\d{1,2} (stycznia|lutego|marca|kwietnia|maja|czerwca|lipca|sierpnia|września|października|listopada|grudnia))\]\]/g, '$1' );
str = str.replace( /\[\[(\d{1,2} (stycznia|lutego|marca|kwietnia|maja|czerwca|lipca|sierpnia|września|października|listopada|grudnia))\|(.*?)\]\]/g, '$3' );
str = str.replace( /\[\[(styczeń|luty|marzec|kwiecień|maj|czerwiec|lipiec|sierpień|wrzesień|październik|listopad|grudzień)\]\]/gi, '$1' );
str = str.replace( /\[\[(styczeń|luty|marzec|kwiecień|maj|czerwiec|lipiec|sierpień|wrzesień|październik|listopad|grudzień)\|(.*?)\]\]/gi, '$2' );
str = str.replace( /\[\[([XIV]+ w(\.|iek))\]\]/g, '$1' );
str = str.replace( /\[\[([XIV]+ w(\.|iek))\|(.*?)\]\]/g, '$3' );
str = str.replace( /\[\[(Lata \d0\. [XIV]+ wieku)\]\]/gi, '$1' );
str = str.replace( /\[\[(Lata \d0\. [XIV]+ wieku)\|(.*?)\]\]/gi, '$2' );
if ( str == orig ) return;
var el = document.getElementById( 'wpSummary' );
if ( el.value != '' ) el.value += ', ';
el.value += 'usunięcie zbędnych linków do dat';
sel_t.setSelStr( input, str );
}
daty.button = function() {
var that = this;
toolbarGadget.addButton( {
title: 'Usuń linki do dat z zaznaczenia',
alt: 'Usuń linki do dat',
id: 'daty_btn',
oldIcon: '//upload.wikimedia.org/wikipedia/commons/3/3f/Button_attendre.png',
newIcon: '//commons.wikimedia.org/w/thumb.php?f=Time%20to%20stop.svg&w=22',
onclick: function() {
that.zmiatajDaty();
}
} );
}
if ( mw.config.get( 'wgAction' ) == 'submit' || mw.config.get( 'wgAction' ) == 'edit' ) {
mw.loader.using( ["ext.gadget.lib-toolbar", "ext.gadget.lib-sel_t"], function() {
daty.button();
} );
}
// cudzysłów na pasku
mw.loader.using('ext.gadget.lib-toolbar', function() {
toolbarGadget.addButton( {
'icon': "//upload.wikimedia.org/wikipedia/commons/2/23/Quotes-Lithuanian.png",
'title': "„”",
'alt': "„”",
'onclick': function($wpTextbox1, e) {
$wpTextbox1.textSelection( 'encapsulateSelection', {
pre: '„',
post: '”'
} );
}
} );
} );
// apostrof na pasku
mw.loader.using('ext.gadget.lib-toolbar', function() {
toolbarGadget.addButton( {
'icon': "//upload.wikimedia.org/wikipedia/commons/5/57/Apostrophe.png",
'title': "’",
'alt': "’",
'onclick': function($wpTextbox1, e) {
$wpTextbox1.textSelection( 'encapsulateSelection', {
pre: '’',
post: ''
} );
}
} );
} );
/* Link do brudnopisu w menu osobistym
; autor: [[Wikipedysta:Herr Kriss]]
*/
$(function()
{
var caption = 'brudnopis 1'
mw.util.addPortletLink('p-personal', mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=Special:Mypage/brudnopis1', caption, 'pt-sandbox', 'brudnopis1', '', document.getElementById('pt-preferences'));
//mw.util.addPortletLink('p-personal', mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=Special:Mypage/brudnopis2', caption, 'pt-sandbox', 'brudnopis2', '', document.getElementById('pt-preferences'));
// itd.
});
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.