မီႇတီႇယႃႇဝီႇၶီႇ:Gadget-legacy.js
မၢႆတွင်း: ဝၢႆးသေသိမ်းပၼ်ယဝ်ႉ၊ တွၼ်ႈတႃႇ ၸဝ်ႈၵဝ်ႇ တေႁၼ်လႆႈ လွင်ႈလႅၵ်ႈလၢႆႈၼၼ်ႉ ၸဝ်ႈၵဝ်ႇတေၸၢင်ႈလႆႈလတ်းၶၢမ်ႈ ၶႅတ်ႉၶျ် တူဝ်ပိုတ်ႇဝႅပ်ႉၸဝ်ႈၵဝ်ႇယဝ်ႉ။
- ၽွင်းမိူဝ်ႈတိုၵ်ႉၼဵၵ်း Reload တီႈ Firefox / Safari: ၼၼ်ႉ ၼဵၵ်းဝႆႉပႃး Shift ၊ဢမ်ႇၼၼ် ၼဵၵ်းပၼ် Ctrl-F5 ဢမ်ႇၼၼ် Ctrl-R (တီႈၼႂ်း Mac ၼႆ ၼဵၵ်းပၼ်⌘-R)
- တီႈၼႂ်း Google Chrome: ၼဵၵ်းပၼ် Ctrl-Shift-R (တီႈၼႂ်း Mac ၼႆႉ ၼဵၵ်းပၼ်⌘-Shift-R )
- ၽွင်းမိူဝ်ႈ တိုၵ်ႉၼဵၵ်း Refreshတီႈ Internet Explorer/ Edge: ၼဵၵ်းဝႆႉပၼ် Ctrl ဢမ်ႇၼၼ် ၼဵၵ်းပၼ် Ctrl-F5
- တီႈၼႂ်း Opera: ၵႂႃႇၸူးတီႈ Menu → Settings (ပေႃးပဵၼ်တီႈၼႂ်း Mac ၸိုင် Opera → Preferences ) သေ သိုပ်ႇၵႂႃႇ Privacy & security → Clear browsing data → Cached images and files ၼၼ်ႉလႄႈ။
// {{documentation}}
/** LegacyScripts **/
/*jshint maxerr:1048576, strict:true, undef:true, latedef:true, es5:true */
/*global mw, jQuery, importScript, importScriptURI, $, ObjectStorage */
/* ==importScript== */
/**
* do NOT use this function
**/
var importScriptFromWikibits = window.importScript;
window.importScript = function (page, wiki, oldid) {
if (!wiki && !oldid) return importScriptFromWikibits(page);
mw.log.warn("importScript called with more than one argument. This is deprecated and may be unreliable. Please use mw.loader.load directly");
var url = (wiki ? encodeURIComponent(wiki) : mw.config.get('wgScript')) + '?title=' +
mw.util.wikiUrlencode(page) +
(oldid ? '&oldid=' + encodeURIComponent(oldid) : '') +
'&action=raw&ctype=text/javascript';
return mw.loader.load(url);
};
/* ==Cookies== */
window.setCookie = function setCookie(cookieName, cookieValue) {
/*global escape */
mw.log.warn("deprecated function setCookie called; use jQuery.cookie instead");
var today = new Date();
var expire = new Date();
var nDays = 30;
expire.setTime(today.getTime() + (3600000 * 24 * nDays));
document.cookie = cookieName + "=" + escape(cookieValue) +
";path=/" +
";expires=" + expire.toGMTString();
};
window.getCookie = function getCookie(cookieName) {
/*global unescape */
mw.log.warn("deprecated function getCookie called; use jQuery.cookie instead");
cookieName = String(cookieName);
var start = document.cookie.indexOf(cookieName + "=");
if (start === -1) return "";
var len = start + cookieName.length + 1;
if ((!start) && (cookieName !== document.cookie.substring(0, cookieName.length)))
return "";
var end = document.cookie.indexOf(";", len);
if (end === -1) end = document.cookie.length;
return unescape(document.cookie.substring(len, end));
};
/* ==[[MediaWiki:Youhavenewmessages]] to display differently for non-newbies with JS than for others= */
/* Suspected unresponsive page culprit: see the GP (Nov. 2010, "Blocking script execution on each page") */
if (mw.config.get('wgUserGroups') && mw.config.get('wgUserGroups').indexOf("autoconfirmed") == -1) {
mw.util.addCSS(".visible-to-anons { display: inline; }");
}
/* ===[[WT:PREFS]]== */
if (new ObjectStorage("WT:PREFS").Get() !== null || mw.config.get('wgPageName') === "Wiktionary:Per-browser_preferences") {
//importScript('User:Connel_MacKenzie/custom.js');
importScript('User:Hippietrail/custom.js');
}
/* ==Import [[User:Yair rand/newentrywiz.js]]== */
jQuery(document).ready(function () {
if (document.getElementById('necblah')) {
importScript('User:Yair rand/newentrywiz.js');
}
});
/* ==Temporary button for enabling two proposed scripts== */
if (mw.cookie.get("YRNewStuff") || location.search.indexOf("tabbedlanguages=on") != -1) {
importScript("User:Yair rand/editor2.js");
importScript("User:Yair rand/TabbedLanguages2.js");
}
$(function () {
if (document.getElementById('YRNewStuff-enable-button')) {
document.getElementById('YRNewStuff-enable-button').innerHTML = "";
var toggle = $('<span>').on("click", function () {
if (mw.cookie.get("YRNewStuff")) {
mw.cookie.set("YRNewStuff", null);
toggle.html("Enable tabbed languages and definition editing options.");
} else {
mw.cookie.set("YRNewStuff", 1);
toggle.html("Disable tabbed languages and definition editing options.");
}
}).text((mw.cookie.get("YRNewStuff") ? "Disable" : "Enable") + " tabbed languages and definition editing options.");
$('#YRNewStuff-enable-button').append(toggle);
}
});
/* ==[[WT:ES]] Discussion tool ([[User:Yair rand/DiscussionSandbox.js]]) == */
//mw.config.get('wgPageName') == "Wiktionary:Etymology_scriptorium" && importScript("User:Yair rand/DiscussionSandbox.js");