Line 1: |
Line 1: |
− |
| |
− | MediaWiki:Gadget-Merge.js
| |
− | Jump to navigation
| |
− | Jump to search
| |
− |
| |
− | Note: After saving, you may have to bypass your browser's cache to see the changes.
| |
− |
| |
− | Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
| |
− | Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
| |
− | Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
| |
− | Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
| |
− |
| |
| /*global jQuery, mediaWiki, OO, wikibase*/ | | /*global jQuery, mediaWiki, OO, wikibase*/ |
| /*! | | /*! |
Line 24: |
Line 12: |
| | | |
| 'use strict'; | | 'use strict'; |
− | var messages; | + | var messages, entityId = mw.config.get('wbEntityId'), api = new mw.Api(); |
− | var entityId = mw.config.get( 'wbEntityId' );
| |
− | var api = new mw.Api();
| |
− | console.log("Got API "+ entityId);
| |
| messages = (function () { | | messages = (function () { |
| var translations = { | | var translations = { |
Line 875: |
Line 860: |
| this.entityId = config.entityId; | | this.entityId = config.entityId; |
| } | | } |
− | console.log("about to call OO.inheritClass")
| |
| OO.inheritClass(MergeDialog, OO.ui.ProcessDialog); | | OO.inheritClass(MergeDialog, OO.ui.ProcessDialog); |
− | console.log("called OO.inheritClass") | + | |
− | | |
| MergeDialog.static.name = 'mergeDialog'; | | MergeDialog.static.name = 'mergeDialog'; |
| MergeDialog.static.title = messages.mergeWizard; | | MergeDialog.static.title = messages.mergeWizard; |
Line 901: |
Line 884: |
| } | | } |
| ]; | | ]; |
− | console.log("MergeDialog", MergeDialog)
| |
| | | |
| /** | | /** |
Line 1,004: |
Line 986: |
| .next(function () { | | .next(function () { |
| // focus "Merge with" field: | | // focus "Merge with" field: |
− | // https://wiki.personaldata.io/wiki/?oldid=333747825#Request:_Improvements_for_keyboard_navigation | + | // https://www.wikidata.org/wiki/?oldid=333747825#Request:_Improvements_for_keyboard_navigation |
| this.entitySelector.focus(); | | this.entitySelector.focus(); |
| }, this); | | }, this); |
Line 1,102: |
Line 1,084: |
| this.actions.forEach(null, function (action) { | | this.actions.forEach(null, function (action) { |
| // reenable 'cancel' button, disable all other buttons | | // reenable 'cancel' button, disable all other buttons |
− | // https://wiki.personaldata.io/wiki/?oldid=323115101#Close.2FCancel | + | // https://www.wikidata.org/wiki/?oldid=323115101#Close.2FCancel |
| action.setDisabled(action.getAction() !== 'cancel'); | | action.setDisabled(action.getAction() !== 'cancel'); |
| }); | | }); |
Line 1,133: |
Line 1,115: |
| } | | } |
| | | |
− | console.log("About to initialize")
| |
− | console.log("entityId", entityId)
| |
− | console.log("wgNamespaceNumber", mw.config.get('wgNamespaceNumber'))
| |
− | console.log("Action", mw.config.get('wgAction'))
| |
| // Initialization | | // Initialization |
| if (entityId !== null && | | if (entityId !== null && |
− | [0, 146].indexOf(mw.config.get('wgNamespaceNumber')) !== -1 && | + | [120, 146].indexOf(mw.config.get('wgNamespaceNumber')) !== -1 && |
| mw.config.get('wgAction') === 'view') { | | mw.config.get('wgAction') === 'view') { |
− | console.log("Initializing")
| |
| $(window).on('focus storage', function () { | | $(window).on('focus storage', function () { |
| $('#ca-merge-queue-process').remove(); | | $('#ca-merge-queue-process').remove(); |
Line 1,194: |
Line 1,171: |
| | | |
| }(jQuery, mediaWiki, OO)); | | }(jQuery, mediaWiki, OO)); |
− |
| |
− | Navigation menu
| |
− |
| |
− | English
| |
− | Genferei
| |
− | Talk
| |
− | Preferences
| |
− | Watchlist
| |
− | Contributions
| |
− | Log out
| |
− |
| |
− | Message
| |
− | Discussion
| |
− |
| |
− | Read
| |
− | View source
| |
− | View history
| |
− | Watch
| |
− |
| |
− | Search
| |
− |
| |
− | Main page
| |
− | Recent changes
| |
− | Random page
| |
− | Help about MediaWiki
| |
− | New Item
| |
− | New Property
| |
− | All items
| |
− | All properties
| |
− | All pages
| |
− | Active Users
| |
− | SAR service dev
| |
− | Query Service
| |
− | Maintenance
| |
− | Administrator
| |
− |
| |
− | Tools
| |
− |
| |
− | What links here
| |
− | Related changes
| |
− | Upload file
| |
− | Special pages
| |
− | Printable version
| |
− | Permanent link
| |
− | Page information
| |
− |
| |
− | Interaction
| |
− |
| |
− | Community portal
| |
− | WebXray
| |
− | Recent changes
| |
− | Contact Page
| |
− |
| |
− | In other languages
| |
− |
| |
− | Add links
| |
− |
| |
− | This page was last edited on October 16, 2019, at 13:00.
| |
− |
| |
− | Privacy policy
| |
− | About Wikibase Personal data
| |
− | Disclaimers
| |
− | Mobile view
| |
− |
| |
− | Powered by MediaWiki
| |