Set opener to null when opening original URL with JavaScript.
This commit is contained in:
parent
9d8b5421ed
commit
0227bb9828
2 changed files with 6 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
||||||
// Code generated by go generate; DO NOT EDIT.
|
// 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
|
package static
|
||||||
|
|
||||||
var Javascript = map[string]string{
|
var Javascript = map[string]string{
|
||||||
"app": `(function(){'use strict';class DomHelper{static isVisible(element){return element.offsetParent!==null;}
|
"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 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]);}}
|
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;}
|
return result;}
|
||||||
|
@ -92,5 +92,5 @@ document.addEventListener("DOMContentLoaded",function(){FormHandler.handleSubmit
|
||||||
}
|
}
|
||||||
|
|
||||||
var JavascriptChecksums = map[string]string{
|
var JavascriptChecksums = map[string]string{
|
||||||
"app": "69dd98768624d2d683b6ba27f558b06e16451e63b460e091dafd7601ca29dad4",
|
"app": "803826d0f7d801ed07437712668d00247112b6f85eae5b1b46f3ac9f95fe2b18",
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,9 @@ class DomHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static openNewTab(url) {
|
static openNewTab(url) {
|
||||||
let win = window.open(url, "_blank");
|
let win = window.open("");
|
||||||
|
win.opener = null;
|
||||||
|
win.location = url;
|
||||||
win.focus();
|
win.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue