Create manifest.json
1  | {  | 
choose an icon you like like ‘bb.ico’
declare extension function, matches website …
Create content.js
1  | let adSelectors = [  | 
1  | # ad frame  | 
hide target ad dom.
if you like, you can adjust the main DOM.
1  | document.getElementsByTagName('main')[0].style.width = '75%'  | 
this line in repository cause aside squeezed underneath the main dom
and i don’t like it, so i delete this line.
Install extension
in chrome open this url chrome://extensions/
open toggle developer mode
clike LOAD UNPACKED, choose project folder.
enjoy :-)
https://github.com/JerryYuanJ/demos/tree/master/02-simple-csdn-ad-blocker
https://blog.csdn.net/qq_25324335/article/details/82595836