// ==UserScript== // @name My HKG Style // @namespace https://greasyfork.org/users/1006-peach // @version 1.1.2 // @description My Style using at HKGolden // @homepageURL https://greasyfork.org/users/1006-peach // @include http://*.hkgolden.com/topics.aspx* // @include http://*.hkgolden.com/view.aspx* // @include http://*.hkgolden.com/*rofile*age.aspx* // @include http://*.hkgolden.com/*earch*.aspx* // @include http://*.hkgolden.com/secondHand.aspx* // @include http://*.hkgolden.com/addSecondHand.aspx* // @include http://*.hkgolden.com/post.aspx* // @include http://*.hkgolden.com/login.aspx* // @require http://code.jquery.com/jquery-1.10.2.min.js // @copyright 2015-2017, Peach // @downloadURL none // ==/UserScript== var currentServer; currentServer = window.location.href.match(/(forum\d+|search|profile|archive)/)[0]; setTimeout(function() { // 頂部藍啡黃BRA + Logo jQuery('#aspnetForm > table:eq(0)').remove(); // 頂部空白 jQuery('.PageMiddleFunctions').remove(); jQuery('.PageMiddleBox').css('padding', '0 4px').css('width', '947px'); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div[style="height:5px"]:eq(0)').remove(); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(2)').css('height', '0'); // 頂部斷行 jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > br:eq(0)').remove(); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > br:eq(0)').remove(); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > br:eq(0)').remove(); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > br:last').remove(); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > br:last').remove(); jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0) > br:eq(0)').remove(); jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0) > br:eq(0)').remove(); jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0) > br:last').remove(); jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0) > br:last').remove(); // 頂部闊度 jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0)').css('width', '100%'); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(1)').css('width', '0%'); // 閣下現登入為 jQuery('#ctl00_ContentPlaceHolder1_lb_UserName').css('font-size', '16px').css('font-weight', 'bold'); // [公司模式-關] jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0)').css('font-size', '12px').css('font-weight', 'normal'); // 您現在聚腳在 jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0)').css('font-size', '12px').css('font-weight', 'normal'); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > span:eq(0)').css('font-size', '16px').css('font-weight', 'bold'); jQuery('.ContentPanel > table:eq(0) > tbody:eq(0) > tr:eq(0) > td:eq(0) > div:eq(0) > b:eq(0)').css('font-size', '12px').css('font-weight', 'normal'); jQuery('#ctl00_ContentPlaceHolder1_view_form > table:eq(0) > tbody > tr:eq(0) > td:eq(0) > div:eq(0) > b:eq(0)').css('font-weight', 'normal'); // 搜尋BRA jQuery('.Topic_FunctionPanel > div:eq(0) > br:eq(0)').remove(); jQuery('.Topic_FunctionPanel > div:eq(0) > br:eq(0)').remove(); jQuery('.Topic_FunctionPanel > div:eq(1) > br:eq(0)').remove(); jQuery('.Topic_FunctionPanel > div:eq(0) > a > img[alt="New"]').css('border-width', '0px').css('vertical-align', 'bottom'); jQuery('.HitSearchText').css('font-size', '12px'); jQuery('.Topic_FunctionPanel').css('margin', '0'); // » 高登主頁 » jQuery('#ctl00_ContentPlaceHolder1_view_form > div:eq(1)').css('float', 'left').css('padding', '0'); jQuery('#ctl00_ContentPlaceHolder1_view_form > div:eq(2)').css('float', 'right').css('padding', '0'); jQuery('#ctl00_ContentPlaceHolder1_view_form > div:eq(3)').css('clear', 'both'); // 投票站 var $voting=jQuery('#ctl00_ContentPlaceHolder1_votingThreadMsg').html(); if($voting){ jQuery('#ctl00_ContentPlaceHolder1_votingThreadMsg').remove(); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' ['+$voting+'] '); } // 提名每月之星 var $nominate=jQuery('#ctl00_ContentPlaceHolder1_nominateLabel').html(); if($nominate){ jQuery('#ctl00_ContentPlaceHolder1_nominateLabel').remove(); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' ['+$nominate+'] '); } // 精選文章 if (jQuery('#Iframe1').length !== 0) { var t=0; jQuery('#Iframe1').parent().css({'display': 'block'}); jQuery('#Iframe1').parent().css({'height': '0px'}); jQuery('#Iframe1').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [精選文章] '); jQuery('.topart').click(function(){ if(t===0){ jQuery('#Iframe1').animate({'height':'240px'}); jQuery('#Iframe1').parent().animate({'height':'255px'}); t=1; }else{ jQuery('#Iframe1').animate({'height':'0px'}); jQuery('#Iframe1').parent().animate({'height':'0px'}); t=0; } }); } // 高登指數 if (jQuery('#ddtabs1').length !== 0) { var gi=0; jQuery('#ddtabs1').parent().css({'display': 'block'}); jQuery('#ddtabs1').parent().css({'height': '0px'}); jQuery('#ddtabs1').hide(); jQuery('#ddtabs1').parent().find('.tabcontainer').hide(); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [高登指數] '); jQuery('.goldenIndex').click(function(){ if(gi===0){ jQuery('#ddtabs1 .current').removeClass('current'); jQuery('#ddtabs1 [rel="sc2"]').addClass('current'); jQuery('#sc1').hide(); jQuery('#sc3').hide(); jQuery('#sc2').show(); jQuery('#ddtabs1').parent().animate({'height':'280px'}); jQuery('#ddtabs1').show(); jQuery('#ddtabs1').parent().find('.tabcontainer').show(); gi=1; }else{ jQuery('#ddtabs1').parent().animate({'height':'0px'}); jQuery('#ddtabs1').hide(); jQuery('#ddtabs1').parent().find('.tabcontainer').hide(); gi=0; } }); } // 熱門著數 if (jQuery('[style="height:291px;"] > iframe').length !== 0) { var hj=0; jQuery('[style="height:291px;"] > iframe').addClass('hj'); jQuery('.hj').parent().css({'display': 'block'}); jQuery('.hj').parent().css({'height': '0px'}); jQuery('.hj').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [熱門著數] '); jQuery('.tophj').click(function(){ if(hj===0){ jQuery('.hj').animate({'height':'260px'}); jQuery('.hj').parent().animate({'height':'260px'}); hj=1; }else{ jQuery('.hj').animate({'height':'0px'}); jQuery('.hj').parent().animate({'height':'0px'}); hj=0; } }); } // 熱門著數@view.aspx if (jQuery('[style="height:290px;"] > iframe').length !== 0) { var hj2=0; jQuery('[style="height:290px;"] > iframe').addClass('hj2'); jQuery('.hj2').parent().css({'display': 'block'}); jQuery('.hj2').parent().css({'height': '0px'}); jQuery('.hj2').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [熱門著數] '); jQuery('.tophj2').click(function(){ if(hj2===0){ jQuery('.hj2').animate({'height':'260px'}); jQuery('.hj2').parent().animate({'height':'260px'}); hj2=1; }else{ jQuery('.hj2').animate({'height':'0px'}); jQuery('.hj2').parent().animate({'height':'0px'}); hj2=0; } }); } // MTGamer if (jQuery('#mtblock').length !== 0) { var mt=0; jQuery('#mtblock').addClass('mt'); jQuery('.mt').css({'display': 'block', 'overflow': 'hidden'}); jQuery('.mt').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [MTGamer] '); jQuery('.topmt').click(function(){ if(mt===0){ jQuery('.mt').animate({'height':'260px'}); mt=1; }else{ jQuery('.mt').animate({'height':'0px'}); mt=0; } }); } // MTGamer@20161113 if (jQuery('[style="height:291px;"] > .container').length !== 0) { var mt2=0; jQuery('[style="height:291px;"] > .container').addClass('mt2'); jQuery('.mt2').parent().css({'display': 'block', 'overflow': 'hidden'}); jQuery('.mt2').parent().css({'height': '0px'}); jQuery('.mt2').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [MTGamer] '); jQuery('.topmt2').click(function(){ if(mt2===0){ jQuery('.mt2').animate({'height':'260px'}); jQuery('.mt2').parent().animate({'height':'260px'}); mt2=1; }else{ jQuery('.mt2').animate({'height':'0px'}); jQuery('.mt2').parent().animate({'height':'0px'}); mt2=0; } }); } // MTGamer@20161114 if (jQuery('#mtblock1').length !== 0) { var mt3=0; jQuery('#mtblock1').addClass('mt3'); jQuery('.mt3').css({'display': 'block', 'overflow': 'hidden'}); jQuery('.mt3').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [MTGamer] '); jQuery('.topmt3').click(function(){ if(mt3===0){ jQuery('.mt3').animate({'height':'260px'}); mt3=1; }else{ jQuery('.mt3').animate({'height':'0px'}); mt3=0; } }); } // MTGamer@20170317 if (jQuery('#mtblock2').length !== 0) { var mt4=0; jQuery('#mtblock2').addClass('mt4'); jQuery('.mt4').css({'display': 'block', 'overflow': 'hidden'}); jQuery('.mt4').css({'height': '0px'}); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [MTGamer] '); jQuery('.topmt4').click(function(){ if(mt4===0){ jQuery('.mt4').animate({'height':'260px'}); mt4=1; }else{ jQuery('.mt4').animate({'height':'0px'}); mt4=0; } }); } // 高登公告 in Topic page if (jQuery('.DivResizableBoxContainer').length !== 0) { var ann=0; var annHeight=jQuery('.DivResizableBoxContainer').height(); jQuery('.DivResizableBoxContainer').css({'display': 'block'}); jQuery('.DivResizableBoxContainer').css({'height': '0px'}); jQuery('.DivResizableBoxContainer').hide(); jQuery('#ctl00_ContentPlaceHolder1_lb_NewPM').prepend(' [高登公告] '); jQuery('.announce').click(function(){ if(ann===0){ jQuery('.DivResizableBoxContainer').show(); jQuery('.DivResizableBoxContainer').animate({'height':annHeight + 'px'}); ann=1; }else{ jQuery('.DivResizableBoxContainer').animate({'height':'0px'},400, function(){jQuery('.DivResizableBoxContainer').hide();}); ann=0; } }); } //若果大家不想見到小圈子post (用日向的Ajax更新,更新後會再出現) if (jQuery('[style="background-color: #6EA0C4; color:white; font-family: Arial;"]').length !== 0) { jQuery('[style="background-color: #6EA0C4; color:white; font-family: Arial;"]').remove(); } /* // 討論區守則 <- 會同二手區撞 if (jQuery('.DivBoxContainer').length !== 0) { jQuery('.DivBoxContainer').remove(); } */ // 伸延閱讀 if (jQuery('#ctl00_ContentPlaceHolder1_view_form > iframe').length !== 0) { jQuery('#ctl00_ContentPlaceHolder1_view_form > iframe').remove(); } // 頂部文字廣告 if (jQuery('[id="Top Textlink Zone 1"]').length !== 0) { jQuery('[id="Top Textlink Zone 1"]').parent().remove(); } if (jQuery('[id="Top Textlink Zone 2"]').length !== 0) { jQuery('[id="Top Textlink Zone 2"]').parent().remove(); } if (jQuery('[id="Top Textlink Zone 3"]').length !== 0) { jQuery('[id="Top Textlink Zone 3"]').parent().remove(); } // 右上圖形廣告 if (jQuery('[id="Crazy Ads Zone"]').length !== 0) { jQuery('[id="Crazy Ads Zone"]').parent().remove(); } if (jQuery('[id="Large Rectangle"]').length !== 0) { jQuery('[id="Large Rectangle"]').parent().remove(); } if (jQuery('[id="Entry Point"]').length !== 0) { jQuery('[id="Entry Point"]').parent().remove(); } // 搜尋BRA下方文字廣告 if (jQuery('[id="Right Textlink Zone"]').length !== 0) { jQuery('[id="Right Textlink Zone"]').parent().remove(); } // 文章列表廣告 if (jQuery('#mainTopicTable tr:not([userid] > td)').length !== 0) { jQuery('#mainTopicTable tr:not([userid]) > td').parent().remove(); } // 底部廣告Code if (jQuery('.ContentPanel > center').length !== 0) { jQuery('.ContentPanel > center').remove(); } if (jQuery('.FooterPanel').length !== 0) { jQuery('.FooterPanel').remove(); } // Topic page廣告 if (jQuery('.myTestAd').parent().length !== 0) { jQuery('.myTestAd').parent().remove(); } if (jQuery('[id^=MsgInLineAd]').parent().length !== 0) { jQuery('[id^=MsgInLineAd]').parent().remove(); } if (jQuery('.repliers[border="1"]').parent().length !== 0) { jQuery('.repliers[border="1"]').parent().remove(); } if (jQuery('.repliers > tr:not([userid] > td)').length !== 0) { jQuery('.repliers > tr:not([userid]) > td').remove(); } if (jQuery('span[style="width:728px"]').length !== 0) { jQuery('span[style="width:728px"]').remove(); } // PM page廣告 if (jQuery('[id^=PMInLineAd]').parent().parent().length !== 0) { jQuery('[id^=PMInLineAd]').parent().parent().remove(); } // 發帖紀錄page廣告 if (jQuery('#ctl00_ContentPlaceHolder1_dataLabel [id^=Span]').parent().parent().length !== 0) { jQuery('#ctl00_ContentPlaceHolder1_dataLabel [id^=Span]').parent().parent().remove(); } // Helianthus.annuus Menu setTimeout(function() { if (jQuery('#an').length !== 0) { jQuery('#an-mainmenu').css('top', '80px').css('font-size', '12px'); jQuery('#an-buttons').css('left', 'initial').css('right', '5px').css('border-left', '0').css('padding-left', '0'); jQuery('#an-buttons > ul:eq(0) > li:eq(0)').css('display', 'none'); } }, 500); // 請選擇討論區 jQuery('#forum_list').remove(); jQuery('body').append('
\ My Page \
'); //新細明體 jQuery('head').append(''); }, 500);