@@ -79,9 +79,12 @@ var FilterPlain = function(s) {
7979} ;
8080
8181FilterPlain . prototype . retrieve = function ( s , out ) {
82- if ( s === this . s . slice ( 0 , s . length ) ) {
82+ if ( s === this . s ) {
8383 out . push ( this . s ) ;
8484 }
85+ // if ( s === this.s.slice(0, s.length) ) {
86+ // out.push(this.s);
87+ // }
8588} ;
8689
8790/******************************************************************************/
@@ -92,7 +95,7 @@ var FilterPlainHostname = function(s, hostname) {
9295} ;
9396
9497FilterPlainHostname . prototype . retrieve = function ( s , out ) {
95- if ( s === this . s . slice ( 0 , s . length ) && pageHostname === this . hostname ) {
98+ if ( s === this . s && pageHostname === this . hostname ) {
9699 out . push ( this . s ) ;
97100 }
98101} ;
@@ -147,7 +150,7 @@ FilterParser.prototype.parse = function(s) {
147150
148151 this . anchor = s . indexOf ( '##' ) ;
149152 if ( this . anchor < 0 ) {
150- this . anchor = s . indexOf ( '#@' ) ;
153+ this . anchor = s . indexOf ( '#@# ' ) ;
151154 if ( this . anchor < 0 ) {
152155 this . invalid = true ;
153156 return this ;
@@ -157,7 +160,11 @@ FilterParser.prototype.parse = function(s) {
157160 if ( this . anchor > 0 ) {
158161 this . hostnames = s . slice ( 0 , this . anchor ) . split ( / \s * , \s * / ) ;
159162 }
160- this . f = s . slice ( this . anchor + 2 ) ;
163+ if ( this . filterType === '@' ) {
164+ this . f = s . slice ( this . anchor + 3 ) ;
165+ } else {
166+ this . f = s . slice ( this . anchor + 2 ) ;
167+ }
161168
162169 // selector
163170 var selectorType = this . f . charAt ( 0 ) ;
0 commit comments