User:Synoman Barris/vector.js

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
  • Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac);
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5;
  • Konqueror: simply click the Reload button, or press F5;
  • Opera users may need to completely clear their cache in Tools→Preferences.
<source lang="javascript">
window.Twinkle.prefs = {
  "twinkle": {
    // Place all preferences here, except for Shared IP, Tag, Welcome, and Talkback preferences
    // For example:
    revertMaxRevisions: 13,
    summaryAd: " BTW, I use [[WT:TW|Twinkle]].",
    proddeleteChunks: 20
  },
  "friendly": {
    // Place preferences for Shared IP, Tag, Welcome, and Talkback in here
    // For example:
    watchTaggedPages: true,
    talkbackHeading: "Talkback just for you..."
  }
};
</source>
// Twinkle has moved!
//  - see [[WP:TW]] for more information
//  - for the code, see [[MediaWiki:Gadget-Twinkle.js]]

// This will automatically enable the gadget in the user's preferences
mw.loader.using(['user.options', 'mediawiki.api']).then(function() {
    if (!mw.user.options.get('gadget-Twinkle')) {
        new mw.Api().saveOption('gadget-Twinkle', 1);
    }
});