JavaScript CoffeeScript 写 Chrome 扩展

pynix · June 16, 2014 · Last by pynix replied at June 16, 2014 · 2797 hits

最近内存不够用电脑很卡,一气之下禁用了 flash,但是网页上用 flash 的地方出现一个占位符,很丑。

就想写个扩展把它去掉。

链接:

https://github.com/pynixwang/noflash

coffee 写的,代码很简单,也很丑,我都不好意思。

现在默认是在页面加载完成后的某个时间执行代码,所以如果 js 添加的 flash 应该没办法去掉。

update:

今天晚上 pdf 死活打不开,貌似我打开 chrome://plugins 的时候看见一眼,pdf 也是个插件,然后看见它也是 embed 类型。

去掉 js 的不知道这样行不行

document.original_write = document.write;

document.write = function(args) {}
  // stop it if contains flash logic;
  document.original_write(args);
;

#1 楼 @billy 晚上回来看看。。。

#2 楼 @pynix 头像好赞。。你自己做的吗?

#3 楼 @xiongxin8802 是的,你要 svg 可以给你。。。

#4 楼 @pynix 不会什么用 svg,如果可以,发一个高清的 jpg 格式的 到我 qq 邮箱:[email protected]

#5 楼 @xiongxin8802 你在 sf 用了做头像?

#6 楼 @pynix !! how do you know?

#8 楼 @pynix 恩,还打算做个 qq 头像, - - !

You need to Sign in before reply, if you don't have an account, please Sign up first.