Bilddagboken.se stupid security fixer

By Arvid Last update Dec 2, 2007 — Installed 1,557 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 7 posts, 3 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Opaque Scriptwright

function xpathRemove(q){var a=document.evaluate(q,document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0;b<a.snapshotLength;b++){a.snapshotItem(b).parentNode.removeChild(a.snapshotItem(b))}}
if (document.getElementById('showContentImage')) xpathRemove("//div[@id='showContentImageBlocker']");

 
Opaque Scriptwright

oops, lets make that a codeblock for easy reading... sorry for that:

function xpathRemove(q){var a=document.evaluate(q,document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0;b

 
Opaque Scriptwright

Arvid do you have any ideas on the new bdb layout?
Running the following code works for me (on standard photo pages, havn't tested more):function xpathRemove(q){var a=document.evaluate(q,document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0;b
if (document.getElementById('showContentImage')) xpathRemove("//div[@id='showContentImageBlocker']");
The problem is that they now request every page trough some fancy ajaxing, messing up the page URLs. More importantly, these do not activate Greasemonkey either. So the code doesn't run on any images anymore.

 
Arvid Script's Author

Thanks Opaque, fixed now.

 
Opaque Scriptwright

Very nice, love the usage of XPath.
You'll need to fix the blog view, add this:

// @include            http://*.bilddagboken.se/p/blogshow.html?*

Guess they changed the URL, more changes might have occured, this was just the one I directly noticed.

 
Arvid Script's Author

Updated to 1.1. Now supports "blog view / min läslayout" (hah!)

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel