Fix doc about pageURL field which no longer exists
[GM_direct_download_links.git] / direct_download_links.user.js
index 89fa057..8421b49 100644 (file)
@@ -28,6 +28,7 @@
 // @include        http://trovacinema.repubblica.it/*
 // @include        http://www.kataweb.it/tvzap/*
 // @include        http://www.rai.tv/*
+// @include        http://soundcloud.com/*
 // ==/UserScript==
 //
 
  *    the regexp starting from a glob line.
  *  - use xpath instead of regexp like in http://a32.me/2009/11/greasemonkey/
  *  - use jquery, like shown in http://a32.me/2009/11/greasemonkey/
+ *  - Support the "download" attribute for anchors:
+ *    http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#downloading-resources
  */
 
 /* Fields supported by the "site" object.
  *
  * Manadatory fields:
- *   pageURL: the URL of the page we are modifying
+ *   locationRegExp: the regexp describing the URL of the page we are modifying
  *   urlContainer: the element containing the URL to link
  *   urlRegexp: the regular expression for finding the URL, the first
  *              sub-pattern is taken as the URL
@@ -110,6 +113,12 @@ var supported_sites = [
     processURL: _rai_get_actual_url,
     linkDest: 'Player',
   },
+  {
+    locationRegexp: /^http:\/\/soundcloud.com\/.*$/,
+    urlContainer: 'main-content-inner',
+    urlRegexp: /"streamUrl":"([^"]*)"/,
+    linkDest: 'main-content-inner',
+  },
 ];
 
 /* Apply different rules to different sites */