Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: background.js

Issue 29773630: Issue 5761 - Changes require paths to relative (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Address PS1 comment Created May 18, 2018, 5:18 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/antiadblockInit.js » ('j') | messageResponder.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -85,17 +85,17 @@
const acceptableAds = `${subscriptionServer}/exceptionrules.txt`;
const acceptableAdsPrivacyFriendly =
`${subscriptionServer}/exceptionrules-privacy-friendly.txt`;
const redirectLink = "https://adblockplus.org/redirect?link=";
let modules = {};
window.require = function(module)
{
- return modules[module];
+ return modules[module.substr(module.lastIndexOf("/") + 1)];
a.giammarchi 2018/07/02 08:14:26 this is probably already fine but assumes there is
Jon Sonesen 2018/07/09 19:23:49 Yeah, previously there were never `/` characters b
Thomas Greiner 2018/07/26 10:07:59 I'd say let's go with whichever requires making fe
};
modules.utils = {
Utils: {
getDocLink(link)
{
return `${redirectLink}${encodeURIComponent(link)}`;
},
« no previous file with comments | « no previous file | lib/antiadblockInit.js » ('j') | messageResponder.js » ('J')

Powered by Google App Engine
This is Rietveld