Add and fix some information

master
Sven Slootweg 11 years ago
parent 5f17bf3ea9
commit 8456151c34

@ -8,6 +8,8 @@ A simple bookmarklet that lets you click any element in a page and returns the s
**How to make it stop killing my input:** Just click the X in the ScraperScript bar. ScraperScript will release your input.
**How to develop:** Modify the bookmarklet to point at a scraperscript.js that is hosted locally. It's loaded with a cachebuster, so you can simply use the same bookmarklet every time you change the local code.
Known bugs:
* On certain kinds of elements (some submit buttons, some elements with click events), ScraperScript can't prevent the attached event from happening. I'm unsure what causes this.

@ -1,3 +1,4 @@
/* Load jQuery */
_jquery_script=document.createElement("SCRIPT");
_jquery_script.type="text/javascript";
_jquery_script.src="http://cryto.net/scraperscript/jquery.js";
@ -124,26 +125,12 @@ function _jquery_done()
/* We *still* haven't figured out a unique way to select the element.
* Last resort: nth-child. */
/*if(least_sibling_class)
{
var sibling_source = parent.children(node_name + "." + least_sibling_class.name);
node_index = sibling_source.index(real_node) + 1;
node_stack.push({name: node_name, class: least_sibling_class.name, index: node_index});
node = parent;
continue;
}
else
{*/
var sibling_source = parent.children(node_name);
node_index = sibling_source.index(real_node) + 1;
node_stack.push({name: node_name, index: node_index});
node = parent;
continue;
/*}*/
/* name += ':nth-child(' + index + ')'; */
* Last resort: nth-of-type. */
var sibling_source = parent.children(node_name);
node_index = sibling_source.index(real_node) + 1;
node_stack.push({name: node_name, index: node_index});
node = parent;
continue;
}
/* Check if it is indeed unique. */

Loading…
Cancel
Save