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.

54 lines
1.7 KiB
JavaScript

5 years ago
// -------------------------- POPUP (set position)
function ppp(mylink, windowname, width, height, x, y) {
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string') href=mylink;
else href=mylink.href;
var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + x + ',top=' + y + ', resizable=no, location=no, menubar=no');
open.focus();
// setTimeout(function(){ open.close(); }, 15000);
return false;
}
5 years ago
// -------------------------- POPUP RANDOM POSITION TIMEOUT
5 years ago
var w = window.innerWidth;
var h = window.innerHeight;
function posX(){ return Math.ceil(Math.random() * w)-200 }
function posY(){ return Math.ceil(Math.random() * h) }
function pppR(mylink, windowname, width, height) {
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string') href=mylink;
else href=mylink.href;
var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + posX() + ',top=' + posY() + ', resizable=no, location=no, menubar=no');
open.focus();
5 years ago
setTimeout(function(){ open.close(); }, 15000);
5 years ago
return false;
}
5 years ago
// -------------------------- POPUP RANDOM POSITION NO!TIMEOUT
function pppRNT(mylink, windowname, width, height) {
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string') href=mylink;
else href=mylink.href;
var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + posX() + ',top=' + posY() + ', resizable=no, location=no, menubar=no');
open.focus();
//setTimeout(function(){ open.close(); }, 15000);
return false;
}
5 years ago
// -------------------------- REDIRECT OPENER (from popup)
function next(mylink){
5 years ago
var mhref = mylink +'.html';
5 years ago
window.opener.location.href = mhref;
5 years ago
}