1

Disclaimer: I've never written a Safari Extension before and I'm an utter newb at Javascript, though I do have plenty of experience in other languages.

Here's my question: I'm writing a Safari Extension to improve a certain site I visit frequently. One of the improvements I'd like to make is to block the loading of ckeditor.js

<script type="text/javascript" language="javascript" src="ckeditor/ckeditor.js"></script>

The script is slow to load, slow to run, and I can't stand graphical HTML editors anyway.

Is it possible to create a script that will remove ckeditor.js before it downloads? If not, can I write something that will remove it before it runs?

4

1 回答 1

2

There is an existing extension blocking all JavaScripts on a given web page. This site points to two files "global.html" and "injected.js", that control whether to load the script on a per element basis. So it looks like it is possible to modify this to blacklist specific scripts. It might take some work to figure out the right incantation from the "beforeload" event though.

于 2010-12-09T05:50:59.670 回答