aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui
diff options
context:
space:
mode:
authorGravatar dzaikos <you@example.com>2018-06-28 02:08:21 -0400
committerGravatar dzaikos <you@example.com>2018-06-28 02:13:53 -0400
commit0227bb98281a4cd3d00dca6b01df11d2a02da5fc (patch)
treee546fc47eb3aa75c1d4aaa9f319da502442b6e76 /ui
parent9d8b5421ed69f4abe07bddd085b4374c99e4f069 (diff)
Set opener to null when opening original URL with JavaScript.
Diffstat (limited to 'ui')
-rw-r--r--ui/static/js.go6
-rw-r--r--ui/static/js/app.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/ui/static/js.go b/ui/static/js.go
index b9c61aa..bc1f439 100644
--- a/ui/static/js.go
+++ b/ui/static/js.go
@@ -1,11 +1,11 @@
// Code generated by go generate; DO NOT EDIT.
-// 2018-06-19 22:56:40.308801738 -0700 PDT m=+0.030613858
+// 2018-06-28 02:11:57.050292961 -0400 EDT m=+0.005178557
package static
var Javascript = map[string]string{
"app": `(function(){'use strict';class DomHelper{static isVisible(element){return element.offsetParent!==null;}
-static openNewTab(url){let win=window.open(url,"_blank");win.focus();}
+static openNewTab(url){let win=window.open("");win.opener=null;win.location=url;win.focus();}
static scrollPageTo(element){let windowScrollPosition=window.pageYOffset;let windowHeight=document.documentElement.clientHeight;let viewportPosition=windowScrollPosition+windowHeight;let itemBottomPosition=element.offsetTop+element.offsetHeight;if(viewportPosition-itemBottomPosition<0||viewportPosition-element.offsetTop>windowHeight){window.scrollTo(0,element.offsetTop-10);}}
static getVisibleElements(selector){let elements=document.querySelectorAll(selector);let result=[];for(let i=0;i<elements.length;i++){if(this.isVisible(elements[i])){result.push(elements[i]);}}
return result;}
@@ -92,5 +92,5 @@ document.addEventListener("DOMContentLoaded",function(){FormHandler.handleSubmit
}
var JavascriptChecksums = map[string]string{
- "app": "69dd98768624d2d683b6ba27f558b06e16451e63b460e091dafd7601ca29dad4",
+ "app": "803826d0f7d801ed07437712668d00247112b6f85eae5b1b46f3ac9f95fe2b18",
}
diff --git a/ui/static/js/app.js b/ui/static/js/app.js
index e616a2d..0933684 100644
--- a/ui/static/js/app.js
+++ b/ui/static/js/app.js
@@ -8,7 +8,9 @@ class DomHelper {
}
static openNewTab(url) {
- let win = window.open(url, "_blank");
+ let win = window.open("");
+ win.opener = null;
+ win.location = url;
win.focus();
}