Make back button detect if you have the page open in the background
This commit is contained in:
parent
278abb1f8f
commit
6566da2571
@ -20,7 +20,7 @@
|
||||
to add this <span class="type"></span> to your bookmarks.
|
||||
</p>
|
||||
<p>Next time you open the bookmark, the <span class="type"></span> will automatically be opened.</p>
|
||||
<a href="/">Back</a> <a id="open-popup" href="javascript:void(0);">Open Popup Now</a>
|
||||
<a id="back" href="javascript:void(0);">Back</a> <a id="open-popup" href="javascript:void(0);">Open Popup Now</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -14,13 +14,18 @@ if (navigator.platform.match(/Mac/i)) {
|
||||
});
|
||||
|
||||
document.getElementById("open-popup").onclick = function() {
|
||||
|
||||
window.open(
|
||||
popupLink,
|
||||
"PopupTimer" + Date.now(),
|
||||
"width=250,height=100,menubar=no,toolbar=no,location=no,status=no,resizable=no,scrollbars=no"
|
||||
);
|
||||
}
|
||||
|
||||
document.getElementById("back").onclick = function() {
|
||||
if (window.opener)
|
||||
window.close();
|
||||
else
|
||||
location.href = "/";
|
||||
}
|
||||
|
||||
function parseQueryParams() {
|
||||
|
Loading…
Reference in New Issue
Block a user