Add a note about the "download" attribute for anchors
[GM_direct_download_links.git] / direct_download_links.user.js
index 89fa057..e1f17f3 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==
 //
 
@@ -38,6 +39,8 @@
  *    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.
@@ -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 */