Jump to content

អ្នកប្រើប្រាស់:Nums/monobook.js

ពីវិគីភីឌា

សម្គាល់: បន្ទាប់ពីបានរក្សាទុករួចហើយ លោកអ្នកគួរតែសំអាត browser's cache របស់លោកអ្នកដើម្បីមើលការផ្លាស់ប្តូរ។ ខាងក្រោមនេះជាវិធីសំអាត browser's cache ចំពោះកម្មវិធីរុករក(Browser)មួយចំនួន។

  • Firefox / Safari: សង្កត់ [Shift] ឱ្យជាប់រួចចុចប៊ូតុង Reload ឬក៏ចុច Ctrl-F5Ctrl-R ( ⌘-R សំរាប់ Mac)
  • Google Chrome: ចុច Ctrl-Shift-R (⌘-Shift-R សំរាប់ Mac)
  • IE(Internet Explorer): សង្កត់ [Ctrl] ឱ្យជាប់ រួចចុច Refreshប៊ូតុង ឬក៏ចុច Ctrl-F5​។
  • Konqueror: ចុចប៊ូតុង Reload ឬក៏ចុច F5
  • Opera: សូមសំអាតcacheនៅក្នុង [Tools]→[Preferences]
/* <pre><nowiki> */

//=========== Tabs ==============
function addTab(url, name, id, title, key) {
    return addPortletLink('p-cactions', url, name, id, title, key);
}
 
function addTab(url, name, id, title, key, after) {
  return addPortletLink('p-cactions', url, name, id, title, key, after);
}
 
//===== Set Cursor Position in given Textbox =====
//Source: http://parentnode.org/javascript/working-with-the-cursor-position/
function setCaretTo(obj, pos) {
  if (obj.createTextRange) {
    /* Create a TextRange, set the internal pointer to
       a specified position and show the cursor at this
       position
    */
    var range = obj.createTextRange();
    range.move("character", pos);
    range.select();
  } else if (obj.selectionStart) {
    /* Gecko is a little bit shorter on that. Simply
       focus the element and set the selection to a
       specified position
    */
    obj.focus();
    obj.setSelectionRange(pos, pos);
  }
}
 
//====== Get Pagename =======
function getPname() {
  return wgPageName.replace(/_/g, ' ') ;
}

//LastDiff Functions

function doLastDiff() {
  var nurl="http://km.wikipedia.org/w/index.php?title=" + getPname() + "&diff=cur&oldid=prev";
  document.location=nurl;
}
 
function addLastDiff() {
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul') [0];
    var l=addlilink(tabs, "javascript:doLastDiff() ", 'last', '') ;
    l.lastChild.title="Most recent diff";
}
 
if (document.title.indexOf("កំពុងកែប្រែ ") == -1) {
  if(wgCanonicalNamespace.indexOf("Special") == -1) {
    if (window.addEventListener) window.addEventListener("load", addLastDiff, false) ;
    else if (window.attachEvent) window.attachEvent("onload", addLastDiff) ;
  }
}

/* </nowiki></pre> */