Wikipedista:Martin Urbanec/buttons.js

Z Wikipedie, otevřené encyklopedie

Poznámka: Po uložení musíte vyprázdnit mezipaměť vašeho prohlížeče, jinak změny neuvidíte.

// <nowiki>
// Tlačítka dle https://www.mediawiki.org/wiki/Manual:Custom_edit_buttons

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty0',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/E0.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:E0}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty0B',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/E0B.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:E0B}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/E1.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:E1}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty2',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/E2.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:E2}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty3',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/E3.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:E3}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'komPOV',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/POV.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:komPOV}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'komPOV2',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/PO2.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:komPOV2}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty0',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/S1.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:shrnutí}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Experimenty0',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/S2.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:shrnutí2}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'ExperimentyUP',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/EUP.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:EUP}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'EVL',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/EVL.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:EVL}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});


mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Nevýznamné',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/NEV.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:nevýznamné}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Spam',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/SPA.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:spam}} --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'Vítejte',
                type: 'button',
                icon: '//urbanecmbot.toolforge.org/exps/VTI.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: '{{subst:vítejte}} Budete-li mít jakékoliv otázky, neváhejte se na mě obrátit [[User talk:Martin Urbanec|na mé diskusní stránce]]. Můžete se také dotázat celé komunity na [[WP:POMOC|pro to určené stránce]]. S přáním příjemného zbytku dne, --~~~~',
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

mw.loader.using('user.options', function() {
  if(mw.user.options.get('usebetatoolbar')) {
    mw.loader.using('ext.wikiEditor', function() {
      $(function() {
      	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'advanced',
        group: 'format',
        tools: {
            buttonId: {
                label: 'OTRS povolení',
                type: 'button',
                icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/OTRS_topicon.jpg/26px-OTRS_topicon.jpg',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: '',
                        peri: `{{
Svolení autora
|id=
|materiál=
|autor=
}}--~~~~
`,
                        post: ''
                    }
                }
            }
        }
      	});
      });
    });
  }
});

// </nowiki>