Categories
通風報信

Yahoo!奇摩新聞去廣告

很久之前就寫好了,不過一直沒放出來,雖然比起其它網站,奇摩新聞算比較好修改的,不過還是不能改得盡善盡美就是。
那麼底下就是Stylish的樣式語法:


@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain(tw.news.yahoo.com) {
/* 相關內容 */
#mediaarticlerelated {
display: none !important;
}
/* 側邊廣告 */
.yom-secondary {
display: none !important;
}
/* 延伸閱讀 */
#mediainfinitebrowselist {
display: none !important;
}
/* 底部廣告 */
#mediaeditorpicks, #mw-ysm-cm-container {
display: none !important;
}
/* 相關知識+*/
#mediakplus {
display: none !important;
}
/* 討論迴響 */
#yom-comments {
display: none !important;
}
/* 頁腳橫幅 */
#footer-links {
display: none !important;
}
/* 版面調整 */
.yom-primary {
width: auto !important;
}
}

使用前請注意,我的修改是把整個右邊欄都給拿掉,會連今日焦點新聞專輯這兩個非廣告的部份一起消失。
另外還有個調整版面後出現的問題就是,會有些新聞頁面莫名的出現橫向的捲軸出來,但多出來的頁面寬度又都沒有東西在裡面,雖然最後再加上樣式可以處理掉,懷疑是跟奇摩新聞本身使用的Javascript有關,如果有人發現為什麼,麻煩教我一下吧!
P.S. 版面調整在Chrome的Stylish中沒有作用。原因可能跟上面的問題有關。

5 replies on “Yahoo!奇摩新聞去廣告”

WM 發表迴響 取消回覆