Chrome Extension

0 like 0 dislike
4 views
Need to create a Chrome extension and for sharing, here's the code popup.html

<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 should be written page address and title.

But it is displayed not the name of tabs and file popup.html What to do to zapisyvalas the address of the open tabs and name
by | 4 views

2 Answers

0 like 0 dislike
Not sure about extension, but if we are talking about the popup/dialog, then use a (not crossdomain):window.opener.document.title
by
0 like 0 dislike
Likely you should look in the direction of chrome.tabs
by
110,608 questions
257,186 answers
0 comments
32,830 users