Twimg

By DASKAjA Last update Mar 24, 2008 — Installed 402 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 3 posts, 2 voices



Jesse Andrews Admin

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

 
Ziru Scriptwright

Create a new script for the snapshot purpose only (http://userscripts.org/scripts/show/24388). I hope you won't mind my borrowing your code. But if you do, please drop me a line and I will take it out. Thanks!

 
Ziru Scriptwright

Pretty cool. I modified the script a little bit to append a web snapshot whenever a tweet contains a URL link.

Here are the changes:
// change to match all URLs
var regex = /href="(http:\/\/(.*?))"/;

// no changes to the tweet entry collecting code
....

// changes to the last loop
for each (var entry in entrys) {
var match = regex.exec(entry.innerHTML);
if (match && match[1]) {
var url = match[1];
var snapshotElem = document.createElement('td');
snapshotElem.setAttribute('class', 'thumb vcard');
snapshotElem.innerHTML = '';
entry.parentNode.parentNode.appendChild(snapshotElem);
}
}