Hi,
I've just migrated fully over to Chrome (using the dev build 4.0.206.1) and I'm really enjoying the new speed etc. However there were a few userscripts that I've been using that I need in working in Chrome. I've managed to get most working by using the enable scripts switch and placing my user scripts into the User Scripts directory.
However, 1 script just does not seem to work in Chrome.
This script replaces the download link on this page (http://nbcumv.com/photography.html) from this formatCode:// ==UserScript== // @name Nbcmv photos directory switch // @namespace http://userscripts.org/users/23652 // @description Adds /nbcmvi/ to the picture paths // @include * // @exclude about:* // @exclude chrome:* // ==/UserScript== // XPath but the array returned is a normal array[x] // Syntax: $x("//a", 7); function $x(p, type) { var i, arr = [], t = type || 6, xpr = document.evaluate(p,document,null,t,null); for (i = 0; item = xpr.snapshotItem(i); i++) {arr.push(item);} return arr; } var i, l, path, links = $x("//a[contains(@href, '/photos/hires/')]"); for(i=0; i<links.length; i++) { l = links[i]; l.href = 'http://images.nbcmv.com/nbcmvi/photos/hires/' + l.href.split("/photos/hires/")[1]; }
NOTE: The above links won't actually work they are there for examples
But it does not seem to work.
Can any of you experts shed some light onto what I may need to change.


LinkBack URL
About LinkBacks



Reply With Quote

