Welcome guest, is this your first visit? Create Account now to join.
Results 1 to 2 of 2

This is a discussion on Help for a Noob - Userscripts within the Plugins Troubleshooting section, part of the Chrome Plugins category: Hi, I've just migrated fully over to Chrome (using the dev build and I'm really enjoying the new speed ...

  1. #1
    flub is offline Junior Member
    Join Date
    Sep 2009

    Question Help for a Noob - Userscripts


    I've just migrated fully over to Chrome (using the dev build 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.

    // ==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];
    This script replaces the download link on this page (http://nbcumv.com/photography.html) from this format

    to this format

    But it does not seem to work.

    Can any of you experts shed some light onto what I may need to change.

  2. #2
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009


    To be honest it doesn't seem like the user script works for that page anymore.
    It's looking for images with /photos/hires/ in the URL and all I see are ones with /photos/thumb/
    But maybe that's just because I don't have an account. If that's the case, post your console output from ctrl+shift+j and we can help you better.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

Similar Threads

  1. Replies: 57
    Last Post: 10-29-2015, 12:16 PM
  2. Userscripts in Chrome
    By Luc VN in forum Chrome Talk
    Replies: 16
    Last Post: 10-29-2009, 06:47 PM
  3. Help for a Noob - Userscripts
    By flub in forum Chrome Troubleshooting
    Replies: 4
    Last Post: 09-10-2009, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts