Topic awaiting preservation: Capture data from page... |
|
---|---|
Author | Thread |
Maniac (V) Inmate From: under the bed |
posted 12-01-2005 04:32
Hi guys |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 12-01-2005 19:02 |
Paranoid (IV) Inmate From: Norway |
posted 12-01-2005 19:16 |
Paranoid (IV) Mad Librarian From: GlieBeGe |
posted 12-01-2005 19:40
quote:
code: javascript:location.href='http://del.icio.us/kuckus?v=3&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-01-2005 20:40
Small Update to kuckus' code: javascript: location.href='myadminpage.php?s=' +encodeURIComponent(window.getSelection())+'&h=' +encodeURIComponent(location.href)+ '&t='+encodeURIComponent(document.title);
|
Maniac (V) Inmate From: under the bed |
posted 12-01-2005 21:14
quote:
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-01-2005 21:30
yep |
Paranoid (IV) Mad Librarian From: GlieBeGe |
posted 12-01-2005 21:35
quote:
code: /* * * * Quote (part of) a post */ // Inspired by Emperor, http://www.the-emperor.org/ function quotePost(quoteID) { quoteAuthor = stripHTML(getObj("post_" + quoteID + "_author").innerHTML); quoteText = stripHTML(getObj("post_" + quoteID).innerHTML); // Get selection if ((clientVer >= 4) && is_ie && is_win) { // Internet Explorer theSelection = stripHTML(document.selection.createRange().htmlText); } else if (document.getSelection) { // Mozilla theSelection = document.getSelection(); } // check if the selection is part of the post if (theSelection && filterWhitespace(quoteText).indexOf(filterWhitespace(theSelection)) != -1) { quoteText = theSelection; } quoteText = trim(decodeHTMLEntities(quoteText)); quoteUBB = "[quote]\n[b]" + quoteAuthor + " said:[/b]\n\n" + quoteText + "\n[/quote]\n"; insertCode(quoteUBB); } // Strip HTML tags, replace <br />s with line breaks function stripHTML(str) { return str.split("\n").join("").replace(/<\/p>\r<p>/gi, "\r\n\r\n").replace(/<br \/>/gi, "\r\n").replace(/<[^>]*>/g, ""); }
|
Maniac (V) Inmate From: under the bed |
posted 12-01-2005 21:36
excellent - thanks for the link. |
Maniac (V) Inmate From: under the bed |
posted 12-01-2005 22:53
working beautifully =) |