User:PetraMagna/HotCat.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
PetraMagna (talk | contribs) press shift + enter to save |
PetraMagna (talk | contribs) shift and + to enter into edit mode in NS File; no need to touch the mouse now |
||
Line 1,354: | Line 1,354: | ||
DEL = 46, |
DEL = 46, |
||
IME = 229; |
IME = 229; |
||
function clickAddButton() { |
|||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
} |
|||
CategoryEditor.prototype = { |
CategoryEditor.prototype = { |
||
Line 1,573: | Line 1,584: | ||
} |
} |
||
if (save_button) { |
if (save_button) { |
||
clickAddButton(); |
|||
// automatically click the add button |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
} |
} |
||
}, 100); |
}, 100); |
||
Line 2,694: | Line 2,697: | ||
} |
} |
||
}; // end CategoryEditor.prototype |
}; // end CategoryEditor.prototype |
||
// Added by PetraMagna: auto start editing with a keypress |
|||
function startEditing() { |
|||
const several_button = document.querySelector("#catlinks a[title='Modify several categories']"); |
|||
several_button.click(); |
|||
clickAddButton(); |
|||
} |
|||
function initialize() { |
function initialize() { |
||
Line 2,832: | Line 2,842: | ||
} |
} |
||
is_rtl = ( is_rtl === 'rtl' ); |
is_rtl = ( is_rtl === 'rtl' ); |
||
} |
|||
if (mw.config.get("wgNamespaceNumber") === 6) { |
|||
window.addEventListener("keyup", (event) => { |
|||
if (event.shiftKey && event.keyCode === 187) { |
|||
startEditing(); |
|||
⚫ | |||
}) |
|||
} |
} |
||
} |
} |