Thành viên:Nguyenthephuc/monobook.js
Chú ý: Sau khi lưu trang, có thể bạn sẽ phải xóa bộ nhớ đệm của trình duyệt để xem các thay đổi.
- Firefox / Safari: Nhấn giữ phím Shift trong khi nhấn Tải lại (Reload), hoặc nhấn tổ hợp Ctrl-F5 hay Ctrl-R (⌘R trên Mac)
- Google Chrome: Nhấn tổ hợp Ctrl-Shift-R (⇧⌘R trên Mac)
- Internet Explorer / Edge: Nhấn giữ phím Ctrl trong khi nhấn Làm tươi (Refresh), hoặc nhấn tổ hợp Ctrl-F5
- Opera: Nhấn tổ hợp Ctrl-F5.
/* add site wiki map */
function addWikiMap(){
var personal = document.getElementById("p-personal");
var wiki_map = new Array("http://vi.wikipedia.org","http://vi.wiktionary.org","http://vi.wikibooks.org","http://thuvienkhoahoc.com/tusach");
var wiki_name = new Array("Wikipedia","Wiktionary","Wikibooks","VLOS");
var html ='<div id="sitemap" class="pBody">';
html +='<ul>';
for (i=0;i<wiki_map.length;i++){
html +='<li id="'+wiki_name[i]+'" class="';
if (wiki_map[i]==wgServer) html +='active">'+wiki_name[i];
else html +='selected"><a href="'+wiki_map[i]+'" title="'+wiki_name[i]+'">'+wiki_name[i]+'</a>';
html +='</li>';
}
html +='</ul>';
html +='</div>';
personal.innerHTML = html + personal.innerHTML;
}
$(addWikiMap);
/*** Tra Từ Điển vdict.com ****/
function TUDIEN()
{
elCC = document.getElementById('p-tb');
if (elCC != null)
{
THTML = '<div class="portlet"><h5>từ điển vdict</h5><div class="pBody" align="center"><p>';
THTML += '<form name="vdict" method="get" action="http://vdict.com/gateway.php" target="_blank">';
THTML += '<input name="word" id="word" size="16" type="text" /><p />';
THTML += '<select name="dictionary">';
THTML += '<option value="0">Tất cả</option>';
THTML += '<option value="1" selected="selected">Từ điển Anh - Việt</option>';
THTML += '<option value="2">Việt - Anh</option>';
THTML += '<option value="3">Việt - Việt</option>';
THTML += '<option value="4">Việt - Pháp</option>';
THTML += '<option value="5">Pháp - Việt</option>';
THTML += '<option value="6">Computing</option>';
THTML += '<option value="7">Anh - Anh</option>';
THTML += '</select><p />';
THTML += '<input name="Submit" value="Tra cứu" type="submit" />';
THTML += '</form>';
THTML += '</div></div>';
elCC.innerHTML = THTML + elCC.innerHTML;
}
}
$(TUDIEN);
/**** Tùy chọn Bộ Gõ Tiếng Việt ****/
method=1;
on_off=1;
dockspell=1;
dauCu=1;
useCookie=1;
radio=0;
/*** floating box for last recentchanges on vi and en **/
var wikiname=new Array('Wikibooks tiếng Việt');
var el_wiki=new Array('vi');
function getRecent(action)
{ //tao DOM
var doc = sajax_init_object(); //sajax_init_object() hàm có sẵn của MW
if (doc) {
var url = mw.config.get('wgServer')+mw.config.get('wgScript')+"?title=special:Recentchanges&hideminor=0&limit=10&days=1";
doc.onreadystatechange = function() { action(doc); };
doc.open('GET', url, true);
if (doc.overrideMimeType)
doc.overrideMimeType('text/xml');
else
doc.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
doc.send(null);
}
}
function getEvent(){
//_flClosed la bien duoc khai bao o floatingEvent.js
if(_flClosed) return;
var out_html='';
//fl_i la bien duoc khai bao o floatingEvent.js
fl_i++;
k=fl_i;
if(k>=el_wiki.length){k=0;fl_i=0;}
function process(doc) {
try {
if (doc.readyState == 4)
{
if (doc.status == 200){
var source = doc.responseText;
var patt1 = new RegExp("<li class=\"mw-line-even\">","g");
var patt2 = new RegExp("</li>","g");
patt1.test(source);
var source_right = RegExp.rightContext;
patt2.test(source_right);
var newEvent = RegExp.leftContext;
if (newEvent!="")
{
out_html+='<div class="flAd-ln">'+newEvent+'</div>';
document.getElementById('coad').innerHTML=out_html;
CLK_setCookie('fl_i',fl_i);
}
}// if 200
}// if 400
} catch (e) { }// if try
}// if process
getRecent(process);
}// getEvent
try{
if(typeof(CLXMSGA)=="undefined"||!CLXMSGA){
if(typeof(flMsgAdTl)=="undefined"||!flMsgAdTl) flMsgAdTl="Wikibooks Event";
document.write("<style type='text/css'>\n");
document.write("* html div#fl2008 {position: absolute; overflow:hidden;\n");
document.write("top:expression(eval(document.compatMode &&\n");
document.write("document.compatMode=='CSS1Compat') ?\n");
document.write("documentElement.scrollTop\n");
document.write("+(documentElement.clientHeight-this.clientHeight) \n");
document.write(": document.body.scrollTop\n");
document.write("+(document.body.clientHeight-this.clientHeight));} \n");
document.write("#fl2008{font: 12px Arial, Helvetica, sans-serif; color:#666; position:fixed; _position: absolute; z-index:100; right:0; bottom:0; height:150px; }\n");
document.write("#eb121347{ width:189px; padding-right:7px; background:url(http://toanphothong.mienphi100.com/images/9/96/Fullborder_bg_right.gif) no-repeat right top;}\n");
document.write("#cob980648{background:url(http://toanphothong.mienphi100.com/images/e/ef/Fullborder_bg.gif) no-repeat left top; height:150px; padding-left:7px;}\n");
document.write("#coh224925{color:#690;display:block; height:20px; line-height:20px; font-size:11px; width:183px;}\n");
document.write("#coh224925 a{color:#fff;text-decoration:none; font-weight: bold;}\n");
document.write("#coc420217{float:right; padding:0; margin:0; list-style:none; overflow:hidden; height:15px;}\n");
document.write(" #coc420217 li{display:inline;}\n");
document.write(" #coc420217 li a{background:url(http://toanphothong.mienphi100.com/images/7/7a/Button.gif); background-repeat:no-repeat; width:30px; height:0; padding-top:15px; overflow:hidden; float:left;}\n");
document.write(" #coc420217 li a.close{background-position: 0 0;}\n");
document.write(" #coc420217 li a.close:hover{background-position: 0 -15px;}\n");
document.write(" #coc420217 li a.min{background-position: -30px 0;}\n");
document.write(" #coc420217 li a.min:hover{background-position: -30px -15px;}\n");
document.write(" #coc420217 li a.max{background-position: -60px 0;}\n");
document.write(" #coc420217 li a.max:hover{background-position: -60px -15px;}\n");
document.write("</style>\n");
document.write("<div id='fl2008'>\n");
document.write(" <div id='eb121347'>\n");
document.write(" <div id='cob980648'>\n");
document.write(" <div id='coh224925'>\n");
document.write(" <ul id='coc420217'>\n");
document.write(" <li id='rv2008hide'><a class='min' href='javascript:rv2008clickhide();' title='Ẩn cửa sổ này'>Ẩn cửa sổ này</a></li>\n");
document.write(" <li id='rv2008show' style='display:none;'><a class='max' href='javascript:rv2008clickshow();' title='Mở cửa sổ'>Mở cửa sổ</a></li>\n");
document.write(" <li id='rv2008close'><a class='close' href='javascript:rv2008clickclose();' title='Đóng cửa sổ'>Đóng cửa sổ</a></li>\n");
document.write(" </ul>\n");
document.write(" <a id='tlad' target='_blank'>"+flMsgAdTl+"</a>\n");
document.write(" </div>\n");
document.write(" <div id='coad'><img id=\"loading\" alt=\"Đang tải dữ liệu\" src=\"http://toanphothong.mienphi100.com/images/4/42/Loading.gif\" /></div>\n");
document.write(" </div></div></div>\n");
document.write("<scr"+"ipt type='text/jav"+"ascrip"+"t'>\n");
document.write("rv2008bottomLayer = document.getElementById('fl2008');\n");
document.write("var rv2008IntervalId = 0;\n");
document.write("var rv2008maxHeight = 150;\n");
document.write("var rv2008minHeight = 20;\n");
document.write("var rv2008curHeight = 0;\n");
document.write("function rv2008show( ){\n");
document.write(" rv2008curHeight += 2;\n");
document.write(" if (rv2008curHeight > rv2008maxHeight){\n");
document.write(" clearInterval ( rv2008IntervalId );\n");
document.write(" } \n");
document.write(" rv2008bottomLayer.style.height = rv2008curHeight+'px';\n");
document.write("}\n");
document.write("function rv2008hide( ){\n");
document.write(" rv2008curHeight -= 3;\n");
document.write(" if (rv2008curHeight < rv2008minHeight){\n");
document.write(" clearInterval ( rv2008IntervalId ); \n");
document.write(" } \n");
document.write(" rv2008bottomLayer.style.height = rv2008curHeight+'px';\n");
document.write("}\n");
document.write("rv2008IntervalId = setInterval ( 'rv2008show()', 5 );\n");
document.write("function rv2008clickhide(){\n");
document.write(" document.getElementById('rv2008hide').style.display='none';\n");
document.write(" document.getElementById('rv2008show').style.display='inline';\n");
document.write(" rv2008IntervalId = setInterval ( 'rv2008hide()', 5 );\n");
document.write("}\n");
document.write("function rv2008clickshow(){\n");
document.write(" document.getElementById('rv2008hide').style.display='inline';\n");
document.write(" document.getElementById('rv2008show').style.display='none';\n");
document.write(" rv2008IntervalId = setInterval ( 'rv2008show()', 5 );\n");
document.write("}\n");
document.write("function rv2008clickclose(){\n");
document.write(" document.body.style.marginBottom = '0px';\n");
document.write(" rv2008bottomLayer.style.display = 'none';\n");
document.write(" CLK_setCookie('_flClosed', 1);\n");
document.write("}\n");
document.write("</scr"+"ipt>\n");
}
}catch(err){}
//end try
CLXMSGA=true;
function CLK_setCookie(c_name,value,expiredays){
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toGMTString());
}
function CLK_ReadCookie(c_name){
if(document.cookie.length>0){
c_start=document.cookie.indexOf(c_name+"=");
if(c_start!=-1){
c_start=c_start+c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if(c_end==-1)c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return"";
}
_flClosed=CLK_ReadCookie('_flClosed');
if(typeof(_flClosed)=="undefined"||!_flClosed) _flClosed==0;
if(_flClosed==1){rv2008clickclose();}
var fl_i=CLK_ReadCookie('fl_i')*1;
setInterval('getEvent()',5000);