mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-05 21:14:13 -04:00
add dblclick (and fix typo)
This commit is contained in:
parent
a3b70fcb27
commit
ae7248fff0
1 changed files with 7 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
// we have problems if the page has changed the definition of Set or Array
|
// we have problems if the page has changed the definition of Set or Array
|
||||||
// http://www.polyvore.com/ does this for example
|
// http://www.polyvore.com/ does this for example
|
||||||
var __brzl_framesDone = new Set();
|
var __brzl_framesDone = new Set();
|
||||||
var __brzl_popup_re = /window.open\(\s*(['"])(.*?)\1/
|
var __brzl_popup_re = /window.open\(\s*(['"])(.*?)\1/;
|
||||||
var __brzl_compileOutlinks = function(frame) {
|
var __brzl_compileOutlinks = function(frame) {
|
||||||
__brzl_framesDone.add(frame);
|
__brzl_framesDone.add(frame);
|
||||||
var outlinks = [];
|
var outlinks = [];
|
||||||
|
@ -10,10 +10,14 @@ var __brzl_compileOutlinks = function(frame) {
|
||||||
outlinks = Array.prototype.slice.call(
|
outlinks = Array.prototype.slice.call(
|
||||||
frame.document.querySelectorAll('a[href], area[href]'));
|
frame.document.querySelectorAll('a[href], area[href]'));
|
||||||
popups = Array.prototype.slice.call(
|
popups = Array.prototype.slice.call(
|
||||||
frame.document.querySelectorAll('a[onclick]'));
|
frame.document.querySelectorAll('a[onclick], a[ondblclick]'));
|
||||||
if (popups && popups.length > 0) {
|
if (popups && popups.length > 0) {
|
||||||
for (var p=0; p < popups.length; p++) {
|
for (var p=0; p < popups.length; p++) {
|
||||||
m = popups[p].onclick.toString().match(__brzl_popup_re);
|
if (popups[p].onclick){
|
||||||
|
m = popups[p].onclick.toString().match(__brzl_popup_re);
|
||||||
|
} else {
|
||||||
|
m = popups[p].ondblclick.toString().match(__brzl_popup_re);
|
||||||
|
}
|
||||||
if (m) {
|
if (m) {
|
||||||
outlinks.push(m[2]);
|
outlinks.push(m[2]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue