User:Hillgentleman1/monobook.js - 維基百科，自由嘅百科全書

# User:Hillgentleman1/monobook.js

### 出自維基百科，自由嘅百科全書

< User:Hillgentleman1

注意：喺儲存之後，你可能要先略過你嘅瀏覽器快取去睇到更改。Mozilla / Firefox / Safari: 㩒住Shift掣再撳重新載入，又或者㩒Ctrl-Shift-R（喺蘋果Mac中㩒Cmd-Shift-R掣）； IE: 㩒住Ctrl掣再撳重新整理，又或者㩒Ctrl-F5掣； Konqueror: 就咁以撳個重載掣，又或者㩒F5； Opera嘅用戶可能需要先喺工具→喜好設定之中清佢哋嘅快取。

    // [[:en:User:Lupin/popups.js]]

    document.write('<script type="text/javascript" src="'
                 + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
                 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

     document.write('<script type="text/javascript" src="'
     + 'http://zh-yue.wikipedia.org/w/index.php?title=User:Hillgentleman1/wiki/sim2trad.js'
     + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
     document.write('<script type="text/javascript" src="'
     + 'http://zh-yue.wikipedia.org/w/index.php?title=User:hillgentleman1/wiki/KwokYue.js'
     + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

     origStr = "";
     function supplane(num) {
     	if(num >= 65536) num -= 65536;
     	var num1 = Math.floor(num / 1024) + 55296;
     	var num2 = num % 1024 + 56320;
     	return String.fromCharCode(num1) + String.fromCharCode(num2);
     }
     function converts2t() {
     	var content = document.getElementById("bodyContent").innerHTML;
     	var newStr = "";
     	if(origStr.length > 0)
     		content = origStr;
     	if(content.length == 0) {
     		newStr = default_text;
     	}
     	else for(var i = 0; i < content.length; i++) {
     		var unicode = content.charCodeAt(i);
     		if(unicode >= 55296 && unicode <= 56319) {
     			var unicode1 = content.charCodeAt(++i);
     			if(unicode1 >= 56320 && unicode1 <= 57343) {
     				unicode = 1024 * unicode - 56557568 + unicode1 - 56320;
     			}
     		}
     		var unicode2 = table2t[unicode];
     		if(unicode2 > 65535) {
     			newStr += supplane(unicode2);
     		}
     		else if(unicode > 65535 && !unicode2) {
     			newStr += supplane(unicode);
     		}
     		else {
     			newStr += ( unicode2 ) ? String.fromCharCode(unicode2) : String.fromCharCode(unicode);
     		}
     	}
     	origStr = content;
     	document.getElementById("bodyContent").innerHTML = newStr;
     }
     function convertt2s() {
     	var content = document.getElementById("bodyContent").innerHTML;
     	var newStr = "";
     	if(origStr.length > 0)
     		content = origStr;
     	if(content.length == 0) {
     		newStr = default_text;
     	}
     	else for(var i = 0; i < content.length; i++) {
     		var unicode = content.charCodeAt(i);
     		if(unicode >= 55296 && unicode <= 56319) {
     			var unicode1 = content.charCodeAt(++i);
     			if(unicode1 >= 56320 && unicode1 <= 57343) {
     				unicode = 1024 * unicode - 56557568 + unicode1 - 56320;
     			}
     		}
     		var unicode2 = table2s[unicode];
     		if(unicode2 > 65535) {
     			newStr += supplane(unicode2);
     		}
     		else if(unicode > 65535 && !unicode2) {
     			newStr += supplane(unicode);
     		}
     		else {
     			newStr += ( unicode2 ) ? String.fromCharCode(unicode2) : String.fromCharCode(unicode);
     		}
     	}
     	origStr = content;
     	document.getElementById("bodyContent").innerHTML = newStr;
     }
     function convertorig() {
     	if(origStr.length > 0)
     		document.getElementById("bodyContent").innerHTML = origStr;
     }
     if(location.href.indexOf("action=edit") == -1)
     	document.write('<div style=\"position:relative;top:3.7em;text-align:right;margin-right:1em;white-space:nowrap;\"><a href=\"javascript:convertorig();\" style=\"font-size:133%;\">不轉換<\/a>　<a href=\"javascript:converts2t();\" style=\"font-size:133%;\">轉繁體<\/a>　<a href=\"javascript:convertt2s();\" style=\"font-size:133%;\">譯國語<\/a><\/div>');

由 "http://zh-yue.wikipedia.org../../../h/i/l/User%7EHillgentleman1_monobook.js_db24.html" 接收

##### Views

- 用戶頁
- 討論
- 家下嘅版本

##### 交流

- 關於維基百科
- 社區大堂
- 城市論壇
- 詢問處
- 聯絡我哋
- 慷慨解囊
- 幫手

##### 搵嘢