parent
bc2ce96691
commit
23ef4c3692
@ -1,8 +1,19 @@
|
|||||||
function openLink() {
|
function openLink () {
|
||||||
var iframe = document.getElementById("myFrame");
|
var iframe = document.getElementById("myFrame");
|
||||||
var iframeSrc = iframe.getAttribute("src");
|
var iframeSrc = iframe.getAttribute("src");
|
||||||
var encodedSrc = encodeURIComponent(iframeSrc);
|
encode_and_open (iframeSrc)
|
||||||
|
}
|
||||||
var link = "/incert/?link=" + encodedSrc;
|
function openBtnLink () {
|
||||||
window.location.assign(link)
|
var a = document.closest ('a');
|
||||||
}
|
var aSrc = a.getAttribute ("src");
|
||||||
|
|
||||||
|
var encodedaSrc = encodeURIComponent (aSrc);
|
||||||
|
var url = "/incert/?link=" + encodedaSrc;
|
||||||
|
document.querySelector('#myFrame').src = url;
|
||||||
|
document.querySelector('#myFrame').scrollIntoView({ behavior: 'smooth' });
|
||||||
|
}
|
||||||
|
function encode_and_open (event) {
|
||||||
|
var encodedSrc = encodeURIComponent (event);
|
||||||
|
var link = "/incert/?link=" + encodedSrc;
|
||||||
|
window.location.assign (link)
|
||||||
|
}
|
Loading…
Reference in new issue