Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit JavaScript blocks of web page... live

I know you can use Firebug in the DOM view to edit JavaScript variables BUT... is there a way I can use (anything else) to edit live JavaScript that is embedded in a HTML page?

Like this kind that is in a .html page:

<script type="text/javascript>
// code here
</script>

Thanks.

like image 747
test Avatar asked Jan 21 '11 22:01

test


2 Answers

bookmarklets

From the Wikipedia entry

A bookmarklet is an applet, a small computer application, stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. The term is a portmanteau of the terms bookmark and applet. Whether bookmarklet utilities are stored as bookmarks or hyperlinks, they are designed to add one-click functionality to a browser or web page. When clicked, a bookmarklet performs some function, one of a wide variety such as a search query or data extraction. Usually the applet is a JavaScript program.

And as a related note not trying to spam or anything I created a bookmarklet generator to help me create bookmarklets easier.

like image 111
zzzzBov Avatar answered Sep 21 '22 09:09

zzzzBov


You could use Opera 12. Opera 12 allows editing of inline JS and JS files. After you soft reload the page, your changes will be applied. Right click > Source > Make changes > Apply Changes.

like image 34
XP1 Avatar answered Sep 22 '22 09:09

XP1