Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Amit Varia
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

TXP Bookmarklet

Just plug in your TXP install path and use the Bookmarklet Builder to make yourself a nice little bookmarklet for posting to your TXP. The code below will also take the current page’s title and selected text. There’s a lot more data you can use like putting the current page’s url in a custom field.

javascript:
var d=document,
w=window,
e=w.getSelection,
k=d.getSelection,
x=d.selection,
s=(e?e():(k)?k():(x?x.createRange().text:0)),
f='http://PathToYourTXPFolder/index.php',
l=d.location,
e=encodeURIComponent,
p='?bm=1&Section=SectionName&from_view=1&Category1=CategoryName&Title='+e(d.title)+'&Body='+e(s),
u=f+p;
a=function(){
  if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=800,height=800'))
    l.href=u;
}
;
if(/Firefox/.test(navigator.userAgent))
  setTimeout(a,0);
else
  a();
void(0)
Article Request Count:
Posted here:
03 Dec 2007
Article modified:
25 Jan 2008

Comments/questions? Leave a message in the form.

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (3)

Brilliant! I have been looking for a bookmarklet for TXP, great work.

Bookmarklet builder link..

Excellent I was just in the process of building a tumblr inspired textpattern tumblelog and now I have a bookmarklet.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern