T
T
TigranAM2011-01-26 13:12:36
Google Chrome
TigranAM, 2011-01-26 13:12:36

Chrome extension

You need to create a Chrome extension for sharing, here is the popup.html code

< script  type = "text/javascript" >
document.write(' < a  target = "_blank"  href = " site.com/share?status= ' + document.title + ' : ' + document.location + '" > < img  src = "share.png" / >< / a > ');
< / script >


Instead of document.title and document.location, you need to write the page address and title.

But it is not the name of the tab that is displayed, but the file popup.html, What should I do to record the address of the open tab and the name

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Keith, 2011-01-26
@tenbits

Not sure about extension , but if it's about popup/dialog then use (not crossdomain):window.opener.document.title

F
freeborn, 2011-01-26
@freeborn

You should probably look towards chrome.tabs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question