File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function displayPageAction(tabId) {
2727
2828 if ( tabId != - 1 && this . activeRulesets . getRulesets ( tabId ) ) {
2929 chrome . tabs . get ( tabId , function ( tab ) {
30- if ( typeof ( tab ) == "undefined" ) {
30+ if ( typeof ( tab ) === "undefined" ) {
3131 log ( DBUG , "Not a real tab. Skipping showing pageAction." ) ;
3232 }
3333 else {
@@ -57,10 +57,10 @@ AppliedRulesets.prototype = {
5757 } ,
5858
5959 getRulesets : function ( tabId ) {
60- if ( tabId in this . active_tab_rules )
60+ if ( tabId in this . active_tab_rules ) {
6161 return this . active_tab_rules [ tabId ] ;
62- else
63- return null ;
62+ }
63+ return null ;
6464 } ,
6565
6666 removeTab : function ( tabId ) {
@@ -86,8 +86,9 @@ function onBeforeRequest(details) {
8686 // Normalise hosts such as "www.example.com."
8787 var tmphost = tmpuri . hostname ( ) ;
8888 if ( tmphost . charAt ( tmphost . length - 1 ) == "." ) {
89- while ( tmphost . charAt ( tmphost . length - 1 ) == "." )
89+ while ( tmphost . charAt ( tmphost . length - 1 ) == "." ) {
9090 tmphost = tmphost . slice ( 0 , - 1 ) ;
91+ }
9192 tmpuri . hostname ( tmphost ) ; // No need to update the hostname unless it's changed.
9293 }
9394
You can’t perform that action at this time.
0 commit comments