Replace Ads with a HTML File
- traceyourtrack
- May 8, 2016
- 1 min read
In the original script of Portfolio Banners, the src is linked to a website. We tried to change it direct to a html file. However, access to the file is blocked, so “chrome.extension.getURL” is used.

After doing research, we tried to use src="chrome.extension.getURL('ttreplace/index.html')" , but it was not successful. Then, we learnt that a section of “web accessible resources” was required to add in manifest.json. However, the banner (index.html) still cannot be shown. Looking for more references, We realized that src=‘+chrome.extension.getURL("ttreplace/index.html")+’ should be used. The index.html finally replaces the ad on Chrome.
- using a list to show "Trace Your Track" in the result section

- replace the <ul> with <p> in different size of ads

References
Comments