diff options
-rw-r--r-- | .notes/Notes | 2 | ||||
-rw-r--r-- | .uzbl/config | 3 | ||||
-rwxr-xr-x | .uzbl/scripts/adblock.js | 28 | ||||
-rw-r--r-- | .vim/vimrc | 3 |
4 files changed, 32 insertions, 4 deletions
diff --git a/.notes/Notes b/.notes/Notes index 326c04c..0fc94b0 100644 --- a/.notes/Notes +++ b/.notes/Notes @@ -2,9 +2,7 @@ Notes # Phd Todos • High priority - ◦ Establish structure of draft paper ◦ Investigate proof of spectral convergence - ◦ Register by the health center in London • Medium priority ◦ Investigate proof of weak convergence ◦ Obtain rigourous homogenization result diff --git a/.uzbl/config b/.uzbl/config index fd2cedf..2464ca7 100644 --- a/.uzbl/config +++ b/.uzbl/config @@ -453,5 +453,6 @@ set uri = uzbl.org/doesitwork/@COMMIT @bind o = sh 'uri=`$HOME/dotfiles/.uzbl/scripts/load_url_from_surfraw.sh` && echo "uri $uri" > "$UZBL_FIFO"' @on_event DOWNLOAD_COMPLETE spawn @scripts_dir/downloadviewer.sh %s -@on_event LOAD_COMMIT spawn @scripts_dir/adblock.py +# @on_event LOAD_COMMIT spawn @scripts_dir/adblock.py +# @on_event LOAD_COMMIT script @sdir/adblock.js # vim: set fdm=syntax: diff --git a/.uzbl/scripts/adblock.js b/.uzbl/scripts/adblock.js new file mode 100755 index 0000000..b581f9b --- /dev/null +++ b/.uzbl/scripts/adblock.js @@ -0,0 +1,28 @@ +var blocklist = new Array(); +blocklist["IMG"] = [["src", /.*doubleclick.net.*/], + ["src", /.*last.fm\/adserver.*/]]; + +blocklist["SCRIPT"] = [["src", /.*doubleclick.net.*/]]; + +blocklist["IFRAME"] = [["name", /.*google_ads.*/], + ["id", /.*ad-google.*/]]; + + + + +function adblock(event) +{ + var tag = event.target.tagName; + if (!blocklist[tag]) + return; + for(var i = 0; i < blocklist[tag].length; i++) { + if (event.target.getAttribute(blocklist[tag][i][0])) { + if (event.target.getAttribute(blocklist[tag][i][0]).match(blocklist[tag][i][1])) { + event.preventDefault(); + return; + } + } + } +} + +document.addEventListener("beforeload", adblock, true); @@ -45,7 +45,8 @@ Plug 'tpope/vim-surround' Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-vinegar' Plug 'troydm/zoomwintab.vim' -Plug 'Valloric/YouCompleteMe', { 'do' : './install.sh --clang-completer' } +Plug 'Valloric/YouCompleteMe' +", { 'do' : './install.sh --clang-completer' } Plug 'xolox/vim-misc' Plug 'xolox/vim-notes' call plug#end() |