Last active
August 29, 2015 13:58
-
-
Save iMyon/9962219 to your computer and use it in GitHub Desktop.
贴吧css屏蔽指定用户
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @charset "UTF-8"; | |
| /*css地址https://gist.github.com/iMyon/9962219#file-readme-md*/ | |
| /*编译地址http://sassmeister.com/gist/iMyon/9962219*/ | |
| @namespace url(http://www.w3.org/1999/xhtml); | |
| /*~~已屏蔽用户,用于编译后简单记录已屏蔽用户*/ | |
| 已屏蔽用户 { | |
| content: "文科1:\\u6587\\u79d1,文科2:\\u6587\\u79d2,文科3:\\u6587\\u79d3"; | |
| } | |
| /*已屏蔽用户*/ | |
| @-moz-document regexp("http://tieba\.baidu\.com/(f(\\?|/good).*|p/.*)") { | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d1"'] > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d1"'] > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d1"'] > * | |
| , .lzl_single_post[data-field*="'user_name':'文科1'"] > * { | |
| display: none !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d1"']:active > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d1"']:active > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d1"']:active > * | |
| , .lzl_single_post[data-field*="'user_name':'文科1'"]:active > * { | |
| display: block !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d1"']:active:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d1"']:active:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d1"']:active:before | |
| , .lzl_single_post[data-field*="'user_name':'文科1'"]:active:before { | |
| content: ""; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d1"']:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d1"']:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d1"']:before | |
| , .lzl_single_post[data-field*="'user_name':'文科1'"]:before { | |
| content: "文科1 已被屏蔽"; | |
| display: block !important; | |
| background: none; | |
| color: red; | |
| text-align: center; | |
| line-height: 3; | |
| cursor: pointer; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d2"'] > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d2"'] > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d2"'] > * | |
| , .lzl_single_post[data-field*="'user_name':'文科2'"] > * { | |
| display: none !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d2"']:active > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d2"']:active > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d2"']:active > * | |
| , .lzl_single_post[data-field*="'user_name':'文科2'"]:active > * { | |
| display: block !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d2"']:active:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d2"']:active:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d2"']:active:before | |
| , .lzl_single_post[data-field*="'user_name':'文科2'"]:active:before { | |
| content: ""; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d2"']:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d2"']:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d2"']:before | |
| , .lzl_single_post[data-field*="'user_name':'文科2'"]:before { | |
| content: "文科2 已被屏蔽"; | |
| display: block !important; | |
| background: none; | |
| color: red; | |
| text-align: center; | |
| line-height: 3; | |
| cursor: pointer; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d3"'] > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d3"'] > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d3"'] > * | |
| , .lzl_single_post[data-field*="'user_name':'文科3'"] > * { | |
| display: none !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d3"']:active > * | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d3"']:active > * | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d3"']:active > * | |
| , .lzl_single_post[data-field*="'user_name':'文科3'"]:active > * { | |
| display: block !important; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d3"']:active:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d3"']:active:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d3"']:active:before | |
| , .lzl_single_post[data-field*="'user_name':'文科3'"]:active:before { | |
| content: ""; | |
| } | |
| .l_post[data-field*='"user_name":"\\u6587\\u79d3"']:before | |
| , .j_thread_list[data-field*='"author_name":"\\u6587\\u79d3"']:before | |
| , .lzl_single_post[data-field*='"user_name":"\\u6587\\u79d3"']:before | |
| , .lzl_single_post[data-field*="'user_name':'文科3'"]:before { | |
| content: "文科3 已被屏蔽"; | |
| display: block !important; | |
| background: none; | |
| color: red; | |
| text-align: center; | |
| line-height: 3; | |
| cursor: pointer; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- | |
| // Sass (v3.3.7) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| /*css地址https://gist.github.com/iMyon/9962219#file-readme-md*/ | |
| /*编译地址http://sassmeister.com/gist/iMyon/9962219*/ | |
| //~~变量设置 | |
| //添加屏蔽用户可用以下格式,每行一个,($key:$value),`$key`填真实用户名,`$value`是data-filed的name值,需手动把原来的`\u`改成`\\u` | |
| $usernames:( | |
| 文科1:\\u6587\\u79d1, | |
| 文科2:\\u6587\\u79d2, | |
| 文科3:\\u6587\\u79d3 | |
| ); | |
| $show-blocked-info:true; //屏蔽后是否现实文字提示(点击可暂时取消屏蔽),不需要可设为false | |
| $bg-block:none; //屏蔽后显示块的背景色 | |
| $color-block:red; //屏蔽后字体颜色 | |
| //变量设置~~ | |
| @namespace url(http://www.w3.org/1999/xhtml); | |
| /*~~已屏蔽用户,用于编译后简单记录已屏蔽用户*/ | |
| $rec:""; | |
| @each $key, $value in $usernames { | |
| $rec:"#{$rec}#{$key}:#{$value},"; | |
| } | |
| 已屏蔽用户{ | |
| content:str-slice($rec,0,str-length($rec)-1); | |
| } | |
| /*已屏蔽用户*/ | |
| @-moz-document regexp("http://tieba\.baidu\.com/(f(\\?|/good).*|p/.*)") { | |
| @each $key, $value in $usernames { | |
| .l_post[data-field*='"user_name":"#{$value}"'] > * | |
| , .j_thread_list[data-field*='"author_name":"#{$value}"'] > * | |
| , .lzl_single_post[data-field*='"user_name":"#{$value}"'] > * | |
| , .lzl_single_post[data-field*="'user_name':'#{$key}'"] > * { | |
| display:none !important; | |
| } | |
| .l_post[data-field*='"user_name":"#{$value}"']:active > * | |
| , .j_thread_list[data-field*='"author_name":"#{$value}"']:active > * | |
| , .lzl_single_post[data-field*='"user_name":"#{$value}"']:active > * | |
| , .lzl_single_post[data-field*="'user_name':'#{$key}'"]:active > * { | |
| display:block !important; | |
| } | |
| .l_post[data-field*='"user_name":"#{$value}"']:active:before | |
| , .j_thread_list[data-field*='"author_name":"#{$value}"']:active:before | |
| , .lzl_single_post[data-field*='"user_name":"#{$value}"']:active:before | |
| , .lzl_single_post[data-field*="'user_name':'#{$key}'"]:active:before{ | |
| content:""; | |
| } | |
| .l_post[data-field*='"user_name":"#{$value}"']:before | |
| , .j_thread_list[data-field*='"author_name":"#{$value}"']:before | |
| , .lzl_single_post[data-field*='"user_name":"#{$value}"']:before | |
| , .lzl_single_post[data-field*="'user_name':'#{$key}'"]:before{ | |
| @if($show-blocked-info) | |
| { | |
| content:'#{$key} 已被屏蔽'; | |
| } | |
| display:block !important; | |
| background:$bg-block; | |
| color:$color-block; | |
| text-align:center; | |
| line-height:3; | |
| cursor:pointer; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment