Skip to content

Commit

Permalink
Merge pull request #2267.
Browse files Browse the repository at this point in the history
Stop replacing yellowlisted widgets.
  • Loading branch information
ghostwords committed Oct 22, 2019
2 parents 7dd7b4c + f50d70f commit db0687b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/data/socialwidgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
}
},
"SoundCloud": {
"domain": "soundcloud.com",
"domain": "w.soundcloud.com",
"buttonSelectors": [
"iframe[src^='https://w.soundcloud.com/player']"
],
Expand Down
9 changes: 6 additions & 3 deletions src/js/webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,14 @@ let getWidgetBlockList = (function () {
}

badger.widgetList.forEach(function (widget) {
// Only replace blocked and yellowlisted widgets and only if the widget is not on the 'do not replace' list
// replace blocked widgets only
// and only if the widget is not on the 'do not replace' list
const replace = !badger.getSettings().getItem('widgetReplacementExceptions').includes(widget.name);
const action = badger.storage.getBestAction(widget.domain);

widgetsToReplace[widget.name] = replace && constants.BLOCKED_ACTIONS.has(
badger.storage.getBestAction(widget.domain)
widgetsToReplace[widget.name] = replace && (
action == constants.BLOCK ||
action == constants.USER_BLOCK
);
});

Expand Down

0 comments on commit db0687b

Please sign in to comment.