Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Commit a253888

Browse files
committed
this fixes #141
1 parent 5445368 commit a253888

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

js/tab.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,21 @@ function smartReloadTab(tabId) {
637637
break;
638638
}
639639
}
640-
// Exception: a script which was not blocked and which is now blocked
641-
// must result in the page being reloaded, to ensure scripts are
642-
// effectively disabled.
640+
// Exceptions: blocking these previously unblocked types must result in a
641+
// reload:
642+
// - a script
643+
// - a frame
644+
// Related issues:
645+
// https://github.com/gorhill/httpswitchboard/issues/94
646+
// https://github.com/gorhill/httpswitchboard/issues/141
643647
if ( !mustReload ) {
648+
var blockRuleType;
644649
for ( blockRule in newState ) {
645650
if ( !newState.hasOwnProperty(blockRule) ) {
646651
continue;
647652
}
648-
if ( blockRule.indexOf('script|') !== 0 ) {
653+
blockRuleType = blockRule.slice(0, blockRule.indexOf('|'));
654+
if ( blockRuleType !== 'script' && blockRuleType !== 'sub_frame' ) {
649655
continue;
650656
}
651657
if ( !oldState[blockRule] ) {

0 commit comments

Comments
 (0)