User:Rebbing/common.js

/*
 * Imports.
 */
importScript('User:Rebbing/script/deletion-sorting-helper.js');
importScript("User:Rebbing/script/mosify-dates.js");
importScript("User:Rebbing/script/pageswap.js");

/*
 * Popups filters.
 */
importScript('User:Rebbing/script/popups-page-watchers.js');

/*
 * Automatically tick the "Move subpages" option when moving pages.
 */
var moveSubpagesBox = document.getElementsByName("wpMovesubpages")[0];
if (moveSubpagesBox !== undefined) {
  moveSubpagesBox.checked = true;
}

/*
 * Enable AFC helper.
 *
 * This would properly be done by setting false AFCH.consts.whitelistRequired, but there's no standard way to set consts
 * going in: afch-master.js defines AFCH and AFCH.consts. It's possible to prevent them from being redefined, but
 * core.js needs to be able to redefine AFCH.consts to add variables related to the current page. core.js is careful not
 * to overwrite AFCH.consts' already-defined properties, but it's no use, as there's no simple way to get the object
 * past afch-master.js intact without disabling writing.
 */

AFCH = {};
AFCH.checkWhitelist = function(){};

/* Prevent redefinition of AFCH by afch-master.js. */
Object.defineProperty(window, "AFCH", { writable: false });

/* Prevent redefinition of checkWhitelist in core.js. */
Object.defineProperty(AFCH, "checkWhitelist", { writable: false });

/*
 * Helpful UI links.
 */
mw.util.addPortletLink("p-personal", mw.util.getUrl("Special:MyPage/Notes"), "Notes", "pt-notes", null, "Your notes", "#pt-sandbox");
mw.util.addPortletLink("p-personal", mw.util.getUrl("Special:MyPage/sandbox") + "?action=edit", "(edit)", "pt-edit-sandbox", null, "Edit my sandbox", "#pt-preferences");
mw.util.addPortletLink("p-tb", mw.util.getUrl("Special:ExpandTemplates"), "Expand templates");

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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.