Stuff tagged javascript
-
One liner: Find all javascript files used by a website
Just thought I'd document this as its likely to be the sort of thing that others might need. I was doing a bit of a tidyup of our javascript files on the global justice site New Internationalist and I needed to know which javascript files were still in use. Its a recursive grep for .js files right. Well almost. I used the little-known -o parameter for grep, along with -h to make sure I only got a list of .js files enclosed in quotes -- I didn't care which files referenced them. I then removed the quotes, which had to be there for greppage with tr. Next I piped the output through sort -u to get me unique occurences. I might have used -c if I'd needed to know how often files were referenced. Finally I dumped the whole lot into a file. Job done.
$ grep -rhoE "[A-Za-z\.-_]+.js" /var/www/mysite/ | tr -s '"' '\0' | sort -u > 2011-04-05-mysite-all-js-files.txtRead More …- 2011-04-27T15:35:50Z
- Published: 15:35:50 on Wednesday, 27 April
-
Gmail de-ad greasemonkey script
NOTE Google changed the gmail API some time ago. I haven't been able to suss out how and they haven't documented it. So I'm no longer able to support this project. My apologies. Read More …
- 2011-04-11T20:15:15Z
- Published: 20:15:15 on Monday, 11 April
-
Fixed: Flickrshow NS_ERROR_INVALID_POINTER
I recently added a flickrshow to my cider reviews page, Ben Sekulowicz has done a great job with it, it worked exactly like I wanted, well almost. There was something breaking for me, showing up as this error in Firefox:
uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://www.flickrshow.com/static/scripts/flickrshow-7.1.js :: anonymous :: line 357" data: no] Line 0There was a useful post on Defective Semantics called Firefox NS_ERROR_INVALID_POINTER with innerHTMLwhich pointed me in the right direction: it was an character around line 357 that was breaking stuff! Whoulda thunk? Feel free to grab a copy of this version. It works on chromium and iceweasel on Debian squeeze and ie8 on a virtualbox.Read More …- 2011-03-12T15:55:29Z
- Published: 15:55:29 on Saturday, 12 March
-
Charlieharvey.org.uk: Operator Userscript
I've just spent a couple of hours adding some basic microformat support to this site. You might have seen the Find Articles on New Internationalist-type Operator Userscript I made the other day. I thought I should make one for here too! So this is one that adds a "Find articles from Charlie" to your tagspaces options.Read More …
- 2010-08-09T17:53:35Z
- Published: 17:53:35 on Monday, 9 August
This is available as an atom feed for syndication. You can see all tags or a tag cloud if you want.