[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [121] Changes for tasks #11216.
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [121] Changes for tasks #11216. |
Date: |
Tue, 12 Jul 2011 07:49:36 +0000 |
Revision: 121
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=121
Author: valkov
Date: 2011-07-12 07:49:34 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Changes for tasks #11216. Added rule to extract HD links from DOM after single
link is extracted.
Ticket Links:
------------
http://savannah.gnu.org/task/?11216
Modified Paths:
--------------
branches/task-11216/src/lm_extract_dom_objects.js
branches/task-11216/src/lm_site_tedcom.js
branches/task-11216/src/lm_sites.js
Modified: branches/task-11216/src/lm_extract_dom_objects.js
===================================================================
--- branches/task-11216/src/lm_extract_dom_objects.js 2011-07-08 10:24:58 UTC
(rev 120)
+++ branches/task-11216/src/lm_extract_dom_objects.js 2011-07-12 07:49:34 UTC
(rev 121)
@@ -439,21 +439,23 @@
}
}
- if (/ted\.com/i.test(window.location.hostname))
+ if (extracted.link)
{
- if (extracted.link)
+ var self = this;
+ var val = this.call_site_function_at_position.apply(self,[
+ "extract_hd_links_from_dom_if_link",
+ window.location.hostname, param.value]);
+
+ if (val)
{
- this.log("LinternaMagica.extract_link_from_param_list:\n"+
- "Trying to extract ted.com HD links ",1);
- extracted.hd_links =
- this.extract_tedcom_hd_links(param.value);
+ extracted.hd_links = val;
break;
}
}
- else
+
+ if (extracted.link || extracted.video_id)
{
- if (extracted.link || extracted.video_id)
- break;
+ break;
}
}
Modified: branches/task-11216/src/lm_site_tedcom.js
===================================================================
--- branches/task-11216/src/lm_site_tedcom.js 2011-07-08 10:24:58 UTC (rev
120)
+++ branches/task-11216/src/lm_site_tedcom.js 2011-07-12 07:49:34 UTC (rev
121)
@@ -130,3 +130,10 @@
return true;
}
+
+LinternaMagica.prototype.sites["ted.com"].extract_hd_links_from_dom_if_link =
+function(data)
+{
+ return this.extract_tedcom_hd_links(data);
+}
+
Modified: branches/task-11216/src/lm_sites.js
===================================================================
--- branches/task-11216/src/lm_sites.js 2011-07-08 10:24:58 UTC (rev 120)
+++ branches/task-11216/src/lm_sites.js 2011-07-12 07:49:34 UTC (rev 121)
@@ -116,13 +116,22 @@
return true;
}
+// Extract HD/HQ links with site specific function and code if a link
+// is extracted. See
+// lm_site_tedcom.js:extract_hd_links_from_dom_if_link. See comments
+// after LinternaMagica.prototype.sites. See
+LinternaMagica.prototype.sites.__extract_hd_links_from_dom_if_link =
+function()
+{
+ return true;
+}
// LinternaMagica.prototype.sites.__extract_scripts_extract_when // Condition
? DM /ted?
// LinternaMagica.prototype.sites.__extract_scripts_once // YT ?
// LinternaMagica.prototype.sites.__extract_scripts_wait_insert // FB
// LinternaMagica.prototype.sites.__wait_before_inserting_object_from-script
// FB
// LinternaMagica.prototype.sites.__extract_swfobject_regex
-// LinternaMagica.prototype.sites.__extract_swfobject_hdlinks
+
// LinternaMagica.prototype.sites.__extract_video_link_regex
// LinternaMagica.prototype.sites.__extract_video_link_match
// LinternaMagica.prototype.sites.__match_for_video_link
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [121] Changes for tasks #11216.,
Ivaylo Valkov <=