You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
529 B
JavaScript
18 lines
529 B
JavaScript
document.addEventListener("DOMContentLoaded", function () {
|
|
|
|
console.log("greetings from javascript", window.location);
|
|
var name = window.location.href,
|
|
p = name.lastIndexOf("/");
|
|
name = name.substring(p+1);
|
|
var base = name.substring(0, name.length-5);
|
|
if (!base.endsWith("_rvrs")) {
|
|
var rvrs = base + "_rvrs.html";
|
|
// $("#recto").attr("src", rvrs);
|
|
var a = document.createElement("a");
|
|
a.href = rvrs;
|
|
a.target= "recto";
|
|
a.innerHTML = "flipside";
|
|
document.body.appendChild(a);
|
|
}
|
|
});
|