The Javascript code that gave me some problem

This is the full Javascript code that showed up in the posting that gave me some problem. I don’t use this script, a Firefox extension does. The problem was fixed, but I think I’ll just post the code here on page of its own for reference and documentation purposes. I don’t mean to blame the script and extension authors. I don’t really know where the real problem lies in. Is it a bug of the script, or probably the bug of that extension that utilizes this code. And here is the post that explains all of this.

// ==UserScript==
// @name MultiPopup Main Functions File
// @namespace http://www.hesido.com
// @version 2.09
// @date 2005-08-18
// @author Emrah BASKAYA <emrahbaskaya at hesido dot com>
// @description Tooltip Replacement: Replaces Browser Default Tooltips with CSS stylable ones and allows you to customize the information displayed in it and the delay for tooltips.
// @include *
// ==/UserScript==
// Licence Information:
/*
MultiPopup V2.09 Main Functions File
Tooltip Replacement Script
Emrah BASKAYA (hesido – http://www.hesido.com)
Detailed info can be found at:
http://www.hesido.com

You cannot use this code for commercial purposes without
permission of the author. You are not allowed to earn money
from this script or any work that is derived from this script.

Free to use for non-commercial purposes. A link to http://www.hesido.com
is most welcome, in a page on your site, if you are using it for your
website.

For other usage options, please contact the author.

Uses some DOM fallback methods as seen on http://www.quirksmode.org
Code for embedding CSS by D.I.Z.
*/

if (window.addEventListener) window.addEventListener(‘load’, multipopupMain, false);
else if (window.attachEvent) window.attachEvent(‘onload’, multipopupMain);

function multipopupMain(){
if (!document.createElement || !document.getElementsByTagName || !document.getElementById || document.getElementsByTagName(“head”).length == 0) return;

var allowRemotePrefs = true; //Needs to be true to be able to run modules, external preferences and skin
//making this false will almost make Multipopup impenetratable.

// Total Suppression
if (allowRemotePrefs && typeof(mpUSRJS) != “undefined” && mpUSRJS.doNotRun) return;
// Self Supression
if (window.MPwinTriggersActive) return;
// Prerunmodules execution
if (allowRemotePrefs && typeof(mpUSRJS) != “undefined” && typeof(mpUSRJS.preRunModules) != “undefined”) for (var i=0; i<mpUSRJS.preRunModules.length; i++) mpUSRJS.preRunModules[i]();

// pcR->array related to tooltip
// gVr->array that holds generic info
// aOb->array that holds animation info.
var pcR = new Array(), gVr = new Array(), aOb = new Array(), mPu = new Array();

setMPPreferences();

mPu.divIds = [‘mpopupc’,’mpoptop’,’mpopfill1′,’mpopbod’,’mpopfill2′,’mpopfill3′,’mpopfill4′,’mpopbot’,’mpopfill5′,’mpopdbl’,’mpopdblprnt’,’bmtest’];
mPu.styleObId = “mpopupstyleobjectid”
mPu.revEvals = new Array(null,'”rect(“+(clipYTarget-aOb.clipY)+”px, “+(clipXTarget+aOb.clipX)+”px, “+(clipYTarget+aOb.clipY)+”px, “+(clipYTarget-aOb.clipY)+”px)”‘,'”rect(0px, “+(aOb.clipX*2)+”px, “+(clipYTarget*2)+”px, 0px)”‘,'”rect(0px, “+(aOb.clipX*2)+”px, “+(aOb.clipY*2)+”px, 0px)”‘);
mPu.defDesc = “”,pcR.hvrdObj = null,aOb.objMovd = null,aOb.clipStep = 0,aOb.warpStep = 0;
aOb.popActv = false,aOb.objMovd = false,gVr.activeDelay = mPu.popupDelay;
pcR.actOffsetX = mPu.xOfst, pcR.actOffsetY = mPu.yOfst;
aOb.revInt = new Array(),aOb.prevs = new Array();

// Auto Primary Suppress
gVr.suppress = (typeof(mpUSRJS) != “undefined” && mpUSRJS.suppress && mPu.allowSuppress) ? true : false;

// deb = document.getElementById(‘debug’);
// debb = 0;

mPu.setPopups = function() {
if (mPu.revStyle == 0 || mPu.clipSteps == 0) {gVr.desInstRev = true; mPu.clipSteps = 0}
else {gVr.desInstRev = false;}

gVr.instRev = gVr.desInstRev;

var attList = new Array(), attid = new Array(), patternFound;
if (mPu.useFirefoxForceWrap) eval(‘var forcewrapreg = /([^\\s\\&\\/\\-]{‘+mPu.forceBreakAt+’})/g’);
else eval(‘var forcewrapreg = /([^\\s\\/\\-]{‘+mPu.forceBreakAt+’})/g’);
// eval(‘var forcewrapreg = /([^\\s\\&\\/-]{‘+mPu.forceBreakAt+’})/g’); //Opera
var forcewrapreplace = ‘$1’+mPu.brokenSign;
var zerowidthspacereg = /([\&\/-])/g
var zerowidthreplacer = ‘​$1’
for (var i=0; i<mPu.attDesc.length;i++){
if (mPu.attDUse[i]==true) {attList[attList.length]=mPu.attDesc[i]; attid[attid.length] = i}
}

for (var st=0;st<mPu.tTags.length;st++) {
var targetNodes = document.getElementsByTagName(mPu.tTags[st]);
for (var i=0;i<targetNodes.length;i++) {
var toinsert =”, toaltinsrt = ”, loi, inserter = new Array(), instId = new Array(), iclass = new Array(); altinsertr = new Array(), ainsId = new Array(), iaclass = new Array();
for (var mt=0; mt<attList.length;mt++){
loi = targetNodes[i].getAttribute(attList[mt]);
if ((loi == ” || loi == null) && mPu.attDInhrt[attid[mt]] && targetNodes[i].parentNode && targetNodes[i].parentNode.getAttribute) loi = targetNodes[i].parentNode.getAttribute(attList[mt]);
if (loi == null) loi = ”;
if (loi != ”) {
patternFound = mPu.alertPattern[attid[mt]]!=” && loi.match(mPu.alertPattern[attid[mt]]) != null;
if (mPu.forceWordWrap[attid[mt]]) loi = loi.replace(zerowidthspacereg,zerowidthreplacer).replace(forcewrapreg,forcewrapreplace);
// if (mPu.forceWordWrap[attid[mt]]) loi = loi.replace(forcewrapreg,forcewrapreplace); //Opera
if (mPu.attDPri[attid[mt]] || (patternFound && mPu.alertToPri)) { inserter[inserter.length] = loi; instId[instId.length] = attid[mt]; iclass[iclass.length] = (patternFound) ? mPu.alrtClass : mPu.stnClass;}
if (mPu.attDSec[attid[mt]]) {altinsertr[altinsertr.length] = loi; ainsId[ainsId.length] = attid[mt]; iaclass[iaclass.length] = (patternFound) ? mPu.alrtClass : mPu.stnClass;}
if (mPu.setAttNull[attid[mt]]) targetNodes[i].removeAttribute(attList[mt]);
if (patternFound && mPu.alertToPri && mPu.alertInstant) targetNodes[i].instAlert = true;
}
}
if (inserter.length == 1 && mPu.attDNAWA[instId[0]]) toinsert = ‘<div class=”‘+iclass[0]+’ ‘+mPu.spcClass[instId[0]]+'”>’+inserter[0]+'</div>’;
else for (var kt=0; kt<inserter.length; kt++)
{toinsert += ‘<div class=”‘+iclass[kt]+’ ‘+mPu.spcClass[instId[kt]]+'”><span class=”‘+iclass[kt]+’ ‘+mPu.spcClass[instId[kt]]+'”>’+mPu.attDTitle[instId[kt]]+'</span>’+inserter[kt]+'</div>’;}
if (altinsertr.length == 1 && mPu.attDNAWA[ainsId[0]]) toaltinsrt = ‘<div class=”‘+ iaclass[0]+’ ‘+mPu.spcClass[ainsId[0]]+'”>’+altinsertr[0]+'</div>’;
else for (var kt=0; kt<altinsertr.length; kt++)
{toaltinsrt += ‘<div class=”‘+iaclass[kt]+’ ‘+mPu.spcClass[ainsId[kt]]+'”><span class=”‘+iaclass[kt]+’ ‘+mPu.spcClass[ainsId[kt]]+'”>’+mPu.attDTitle[ainsId[kt]]+'</span>’+altinsertr[kt]+'</div>’;}
if (toinsert !=”” || toaltinsrt !=””) {
if (toinsert !=””) {targetNodes[i].primaryView = toinsert; targetNodes[i].primDpresent = true;}
if (toaltinsrt !=””) {targetNodes[i].secondaryView = toaltinsrt; targetNodes[i].altDpresent = true;}
if (!targetNodes[i].triggersActive) {
if (!addCheckTrigger(targetNodes[i],’mouseover’,writeDescription)) targetNodes[i].onmouseover = writeDescription;
if (!addCheckTrigger(targetNodes[i],’mouseout’,clearDescription)) targetNodes[i].onmouseout = clearDescription;
targetNodes[i].triggersActive = true;
}
}
}
}
}

// Embed Internal Style
if (mPu.useDefStyle) {
if (document.getElementById(mPu.styleObId) != null) document.getElementById(mPu.styleObId).parentNode.removeChild(document.getElementById(mPu.styleObId));
var head = document.getElementsByTagName(“head”)[0];
var CSSstyleObj = document.createElement(“style”);
CSSstyleObj.setAttribute(“type”, ‘text/css’);
CSSstyleObj.id = mPu.styleObId;
CSSstyleObj.innerHTML = mPu.defCSS;
head.appendChild(CSSstyleObj);
}

addTrigger(window,’resize’, sizeUpdate);
addTrigger(window,’keydown’, mpopupKeyReceive);
addTrigger(window,’keyup’, mpopupKeyUpreceive);

window.MPwinTriggersActive = true;

mPu.addPopupDiv = addPopupDiv;
addPopupDiv();
sizeUpdate();
mPu.setPopups();

// Postrun modules execution
if (typeof(mPu.postRunModules) != “undefined”) for (var i=0; i<mPu.postRunModules.length; i++) mPu.postRunModules[i]();

function fixPopupPos() {
pcR.scrolledX = (window.pageXOffset) ? window.pageXOffset : (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : 0;
pcR.scrolledY = (window.pageYOffset) ? window.pageYOffset : (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : 0;
if (!doFixPopupPos()) doFixPopupPos();
}

function doFixPopupPos() {
var yiPos = pcR.ygPos + pcR.actOffsetY; var xiPos = pcR.xgPos + pcR.actOffsetX;
pcR.divHeight = aOb.dHght + pcR.TDdifX; pcR.divWidth = aOb.dWdth + pcR.TDdifX;
var sxEdge = (pcR.actOffsetX>0) ? pcR.width – mPu.edgeBufferZone : xiPos;
var syEdge = (pcR.actOffsetY>0) ? pcR.height – mPu.edgeBufferZone : yiPos;
yiPos = Math.max(Math.min(yiPos, syEdge – pcR.divHeight),0);
xiPos = Math.max(Math.min(xiPos, sxEdge – pcR.divWidth),0);
aOb.yPos = yiPos; aOb.xPos = xiPos;
if (pointColDetect(pcR.xgPos,pcR.ygPos,yiPos,xiPos+pcR.divWidth,yiPos+pcR.divHeight,xiPos,3)) {
pcR.actOffsetX = -pcR.actOffsetX; pcR.actOffsetY = -pcR.actOffsetY;
return false;
} else {
pcR.tDiv.style.top = (aOb.yPos + pcR.scrolledY – gVr.bRCompY) + “px”;
pcR.tDiv.style.left = (aOb.xPos + pcR.scrolledX – gVr.bRCompX) + “px”;
} return true; //Modify Ian
}

function pointColDetect(x,y,top,right,bottom,left,boundary) {
top -= boundary; bottom += boundary; left -= boundary; right += boundary;
if ((x>left&&x<right)&&(y>top&&y<bottom)) return true;
return false;
}

function clrIntrvls() {
for (i=0;i<aOb.revInt.length;i++){window.clearInterval(aOb.revInt[i]);}
aOb.revInt = new Array();
}

function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) {
var delta = maxValue – minValue;
var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
return Math.ceil(stepp)
}

function mpopupKeyReceive(e) {
if (!e) e = window.event; //Modify Ian
if (pcR.hvrdObj != null && e.ctrlKey && pcR.hvrdObj.altDpresent) {
var hovered = pcR.hvrdObj; doClearDescription(); doWriteDescription(hovered,e.ctrlKey,e.altKey);
}
if (pcR.hvrdObj != null && e.shiftKey) doClearDescription();
}

function mpopupKeyUpreceive(e) {
if (!e) e = window.event; //Modify Ian
if (pcR.hvrdObj != null) {
var hovered = pcR.hvrdObj; doClearDescription(); doWriteDescription(hovered,e.ctrlKey,e.altKey,true);
}
}

function doWriteDescription(elem,ctrlK,altK,nosuppress) {
var tagDescriptPri = ”, tagDescriptAlt = ”

if (elem.primDpresent) tagDescriptPri = elem.primaryView;
if (elem.altDpresent) tagDescriptAlt = elem.secondaryView;

if (altK || elem.instAlert) {gVr.activeDelay = 0;gVr.activeRevStyle = ‘mPu.instRev()’;gVr.instRev = true;}
if (ctrlK) {var tagDescription = tagDescriptAlt; gVr.activeDelay = 0;}
else {var tagDescription = tagDescriptPri;}
if (!gVr.moveTrigger) {addTrigger(document,’mousemove’, movePopup); gVr.moveTrigger = true;}

pcR.hvrdObj = elem;
pcR.reqDesc = (tagDescription != “” && tagDescription != null);

var wpt = mPu.warpSteps > 0;
pcR.bDiv.style.display = ‘none’; pcR.bDiv.style.display = ‘block’;
pcR.hvrdCh = true; pcR.hvrdFirst = true;

if (pcR.reqDesc) {
pcR.cDiv.innerHTML = tagDescription;
pcR.mDiv.innerHTML = tagDescription;
}

aOb.tWidth = pcR.mDiv.offsetWidth;
aOb.tHeight = pcR.mDiv.offsetHeight;

if (!wpt && pcR.reqDesc) {
mPu.setDdivTargetSize(); fixPopupPos();
}

if (aOb.popActv != true) {
if (wpt) pcR.cDiv.style.left = pcR.padComp+’px’;
aOb.revealTimer = window.setTimeout(
function() {
if (pcR.hvrdObj != null) {
if (pcR.hvrdFirst == true && mPu.warpSteps > 0) {
aOb.tPrevHeight = aOb.tHeight; aOb.tPrevWidth = aOb.tWidth;
mPu.setDdivTargetSize(); fixPopupPos();
}
aOb.revealTimer = 0;
if (gVr.suppress && !ctrlK && !altK && !nosuppress) return;
if (gVr.instRev) aOb.revInt[aOb.revInt.length] = window.setInterval(
function() { //Instant Reveal Function
if (aOb.objMovd == true) {
pcR.cDiv.style.width = aOb.tWidth + ‘px’;
pcR.cDiv.style.height = aOb.tHeight + ‘px’;
fixPopupPos();
if (pcR.reqDesc) pcR.tDiv.style.visibility = ‘visible’;
aOb.popActv = true; aOb.clipAnimDone = true; clrIntrvls();
}
},mPu.revInt);
else aOb.revInt[aOb.revInt.length] = window.setInterval(
function() { //Clip Reveal Function
if (aOb.objMovd == true && aOb.clipStep<mPu.clipSteps) {
pcR.divHeight = pcR.tDiv.offsetHeight; pcR.divWidth = pcR.tDiv.offsetWidth;
aOb.clipStep++;
if (aOb.clipStep<mPu.clipSteps) {
var clipYTarget = Math.ceil(pcR.divHeight / 2); var clipXTarget = Math.ceil(pcR.divWidth / 2);
aOb.clipX = easeInOut(0,clipXTarget,mPu.clipSteps,aOb.clipStep,0.333);
aOb.clipY = easeInOut(0,clipYTarget,mPu.clipSteps,aOb.clipStep,0.333);
pcR.tDiv.style.clip = eval(mPu.revEvals[mPu.revStyle]);
}
else pcR.tDiv.style.clip = “rect(auto auto auto auto)”;
if (pcR.reqDesc) pcR.tDiv.style.visibility = ‘visible’;
aOb.popActv = true;
if (pcR.hvrdCh) {
mPu.setDdivTargetSize(); fixPopupPos();
pcR.hvrdCh = false;
}
} else if (aOb.objMovd == true) {aOb.clipAnimDone = true; gVr.instRev = true; clrIntrvls();}
},mPu.revInt)
}
},gVr.activeDelay);
} else if (aOb.clipAnimDone) {
pcR.tDiv.style.clip = “rect(auto auto auto auto)”;
if (pcR.reqDesc) pcR.tDiv.style.visibility = ‘visible’;
else {pcR.tDiv.style.visibility = ‘hidden’; aOb.popActv = false;}
pcR.hvrdFirst = false;
clrIntrvls();

if (wpt) aOb.revInt[aOb.revInt.length] = window.setInterval(
function() { //Warp Animation Function
if (pcR.hvrdCh) {
pcR.cDiv.style.width = aOb.tWidth + ‘px’;
pcR.cDiv.style.height = aOb.tHeight + ‘px’;
pcR.hvrdCh = false;
}
if (aOb.warpStep < mPu.warpSteps) {
aOb.warpStep++;
aOb.heightSet = easeInOut(aOb.tPrevHeight,aOb.tHeight,mPu.warpSteps,aOb.warpStep,0.333)
aOb.widthSet = easeInOut(aOb.tPrevWidth,aOb.tWidth,mPu.warpSteps,aOb.warpStep,0.333)

mPu.setDdivWarpSize();

pcR.cDiv.style.left = aOb.widthSet-aOb.tWidth+pcR.padComp+”px”;
fixPopupPos();
} else clrIntrvls();
},mPu.revInt);
}

window.clearTimeout(aOb.resetDelayTimer); window.clearTimeout(aOb.hidePopupTimer);

}

function doClearDescription() {
window.clearTimeout(aOb.revealTimer);
aOb.hidePopupTimer = window.setTimeout(
function() { //Hide Popup Function
clrIntrvls();
aOb.warpStep = 0;
pcR.tDiv.style.visibility = ‘hidden’;
aOb.objMovd = false; aOb.popActv = false;aOb.clipStep = 0;
removeTrigger(document,’mousemove’, movePopup);
pcR.tDiv.style.top = “0px”;
pcR.tDiv.style.left = “0px”;
pcR.tDiv.style.clip = “rect(auto auto auto auto)”;
aOb.clipAnimDone = false;
gVr.moveTrigger = false;
pcR.actOffsetX = mPu.xOfst, pcR.actOffsetY = mPu.yOfst;
},mPu.hideDelay);
if (aOb.revealTimer == 0) gVr.activeDelay = 0;
pcR.hvrdObj = null;
aOb.resetDelayTimer = window.setTimeout(
function (){ //Reset Delay To Original Values
gVr.activeDelay = mPu.popupDelay;
gVr.instRev = gVr.desInstRev;
},mPu.instPopDur);
aOb.tPrevHeight = aOb.tHeight;
aOb.tPrevWidth = aOb.tWidth;
aOb.prevs[aOb.prevs.length] = aOb.tHeight
if (aOb.warpStep != mPu.warpSteps && aOb.warpStep > 0) {
aOb.tPrevHeight = aOb.heightSet; aOb.tPrevWidth = aOb.widthSet;
}
aOb.warpStep = 0;
}

function movePopup(e) {
if (pcR.hvrdObj != null || aOb.popActv == true) {
if (!e) {e = window.event;} //Modify Ian
pcR.ygPos = e.clientY; pcR.xgPos = e.clientX;
fixPopupPos();
aOb.objMovd = true;
}
}

function sizeUpdate() {
if (self.innerWidth) {
pcR.width = self.innerWidth; pcR.height = self.innerHeight;}
else if (document.documentElement && document.documentElement.clientWidth) {
pcR.width = document.documentElement.clientWidth; pcR.height = document.documentElement.clientHeight;}
else if (document.body) {
pcR.width = document.body.clientWidth; pcR.height = document.body.clientHeight;}
gVr.bRCompX = 0; gVr.bRCompY = 0;
if (document.body.activeStyle(‘position’,’position’) == ‘relative’) {gVr.bRCompX = document.body.offsetLeft; gVr.bRCompY = document.body.offsetTop}
}

function getElementsByClass(targetTag,tagClass) {
var elementList = document.getElementsByTagName(targetTag); var classTag = new Array();
for (var i=0;i<elementList.length;i++) {
if (elementList[i].className == tagClass) classTag[classTag.length] = elementList[i];
}
return classTag;
}

function addPopupDiv() {
tDv = new Array()
var prefix = “”;
var divlen = mPu.divIds.length;
document.body.activeStyle = getActiveStyle;
if (mPu.useDefStyle==true) prefix = “”;
for (var i=0;i<mPu.divIds.length;i++) {
if (document.getElementById(mPu.divIds[i]) != null) document.getElementById(mPu.divIds[i]).parentNode.removeChild(document.getElementById(mPu.divIds[i]));
tDv[i]=document.createElement(‘div’);
if (mPu.divIds[i] != ”) tDv[i].id = prefix + mPu.divIds[i];
tDv[i].activeStyle = getActiveStyle;
}

tDv[0].style.position = ‘absolute’; tDv[10].style.position = ‘absolute’;
tDv[9].style.position = ‘relative’; tDv[0].style.visibility = ‘hidden’;
tDv[10].style.visibility = ‘hidden’; tDv[5].style.overflow = “hidden”;
tDv[6].style.overflow = “hidden”; tDv[10].style.overflow = “hidden”;
tDv[5].style.position = ‘relative’; tDv[6].style.position = ‘absolute’;
tDv[0].style.zIndex = mPu.ttipZIndex;
tDv[1].appendChild(tDv[2]); tDv[3].appendChild(tDv[4]); tDv[4].appendChild(tDv[5]);
tDv[5].appendChild(tDv[6]); tDv[7].appendChild(tDv[8]); tDv[0].appendChild(tDv[1]);
tDv[0].appendChild(tDv[3]); tDv[0].appendChild(tDv[7]); tDv[10].appendChild(tDv[9]);
/* test the box model for compliance */
pcR.bxMcompX = 0; pcR.bxMcompY = 0;
document.body.appendChild(tDv[divlen-1])
tDv[divlen-1].style.padding = “2px”; tDv[divlen-1].style.height = “50px”;
if (tDv[divlen-1].offsetHeight == 50) {
// mPu.warpSteps = 0;
pcR.bxMcompX = parseInt(tDv[5].activeStyle(‘padding-right’,’paddingRight’))+parseInt(tDv[5].activeStyle(‘padding-left’,’paddingLeft’));
pcR.bxMcompY = parseInt(tDv[5].activeStyle(‘padding-top’,’paddingTop’))+parseInt(tDv[5].activeStyle(‘padding-bottom’,’paddingBottom’));
}

document.body.removeChild(tDv[divlen-1]);
document.body.appendChild(tDv[10])
document.body.appendChild(tDv[0]);

for (var i=0;i<divlen-1;i++) {
var bgIm = tDv[i].activeStyle(“background-image”,”backgroundImage”);
if (bgIm.indexOf(“url”) > -1 && mPu.preload == true) preLoadImage(stripURL(bgIm))
}
pcR.cDiv = tDv[6]; pcR.tDiv = tDv[0]; pcR.dDiv = tDv[5];
pcR.mDiv = tDv[9]; pcR.bDiv = tDv[10];

pcR.padComp = parseInt(tDv[5].activeStyle(‘padding-left’,’paddingLeft’));
tDv[6].style.left = pcR.padComp + ‘px’;

// detect firefox bug and set functions accordingly
tDv[5].style.width = “50px”;
tDv[5].style.height = “50px”;
mPu.setDdivWarpSize = (tDv[5].offsetWidth > tDv[1].offsetWidth && tDv[1].activeStyle(‘display’,’display’) != ‘none’ && tDv[7].activeStyle(‘display’,’display’) != ‘none’) ?
function() {
aOb.dHght = aOb.heightSet + pcR.bxMcompY;
aOb.dWdth = aOb.widthSet + pcR.bxMcompX;
pcR.dDiv.style.height = aOb.dHght + “px”;
pcR.dDiv.style.width = aOb.dWdth + “px”;
tDv[1].style.display = ‘none’;tDv[1].style.display = ‘block’;
tDv[7].style.display = ‘none’;tDv[7].style.display = ‘block’;
} :
function() {
aOb.dHght = aOb.heightSet + pcR.bxMcompY;
aOb.dWdth = aOb.widthSet + pcR.bxMcompX;
pcR.dDiv.style.height = aOb.dHght + “px”;
pcR.dDiv.style.width = aOb.dWdth + “px”;
}

mPu.setDdivTargetSize = (tDv[5].offsetWidth > tDv[1].offsetWidth) ?
function() {
pcR.cDiv.style.height = aOb.tHeight + ‘px’;
pcR.cDiv.style.width = aOb.tWidth + ‘px’;
aOb.dHght = aOb.tHeight + pcR.bxMcompY;
aOb.dWdth = aOb.tWidth + pcR.bxMcompX;
pcR.dDiv.style.height = aOb.dHght + “px”;
pcR.dDiv.style.width = aOb.dWdth + “px”;
tDv[1].style.display = ‘none’;tDv[1].style.display = ‘block’;
tDv[7].style.display = ‘none’;tDv[7].style.display = ‘block’;
} :
function() {
pcR.cDiv.style.height = aOb.tHeight + ‘px’;
pcR.cDiv.style.width = aOb.tWidth + ‘px’;
aOb.dHght = aOb.tHeight + pcR.bxMcompY;
aOb.dWdth = aOb.tWidth + pcR.bxMcompX;
pcR.dDiv.style.height = aOb.dHght + “px”;
pcR.dDiv.style.width = aOb.dWdth + “px”;
}

pcR.TDdifX = tDv[0].offsetWidth – tDv[5].offsetWidth;
pcR.TDdifY = tDv[0].offsetHeight – tDv[5].offsetHeight;

}

function getActiveStyle(style,stylecc) {
if (window.getComputedStyle) return window.getComputedStyle(this,null).getPropertyValue(style)
if (this.currentStyle) return eval(“this.currentStyle.”+stylecc)
}

function preLoadImage(imageurl) {var img = new Image();img.src = imageurl;return img;}

function stripURL(s) {
// I’ll later replace this with proper regex.
s = s.substring(s.indexOf(“url(“)+4,s.lastIndexOf(“)”));if (s.indexOf(‘”‘)>-1) s = s.substring(s.indexOf(‘”‘)+1,s.lastIndexOf(‘”‘));return s;
}

function writeDescription(e) {
if (!e) {e = window.event;} //Modify Ian
if (this != e.target) return;
if (!e.shiftKey) doWriteDescription(this,e.ctrlKey,e.altKey,false)
}

function clearDescription(e) {
if (!e) {e = window.event;} //Modify Ian
if (this != e.target) return;
doClearDescription();
}

function addTrigger(elm,eventname,func) {
if (!addCheckTrigger(elm,eventname,func) && elm.attachEvent) elm.attachEvent(‘on’+eventname, func);
}
function addCheckTrigger(elm,eventname,func) {
if (elm.addEventListener) {elm.addEventListener(eventname, func, false); return true;} else return false;
}
function removeTrigger(elm,eventname,func) {
if (!removeCheckTrigger(elm,eventname,func) && elm.detachEvent) elm.detachEvent(‘on’+eventname, func);
}
function removeCheckTrigger(elm,eventname,func) {
if (elm.removeEventListener) {elm.removeEventListener(eventname, func, false); return true;} else return false;
}

//Embedded preferences
function setMPPreferences() {
if (typeof(mpUSRJS) != “undefined” && allowRemotePrefs) mPu = mpUSRJS;
if (typeof(mPu.prefsVersion) == “undefined”) {mPu.noExtPrefs=true;}
mPu.useDefStyle = true;
mPu.popupDelay = 650;
mPu.hideDelay = 85;
mPu.instPopDur = 370;
mPu.attDesc = [‘htitle’,’alt’,’href’,’src’];
mPu.attDUse = [true,true,true,true];
mPu.attDPri = [true,false,false,false];
mPu.attDSec = [false,true,true,true];
mPu.setAttNull = [false,false,false,false];
mPu.attDInhrt = [true,false,true,false];
mPu.forceWordWrap = [false, false, true, true];
mPu.stnClass = ‘mpop_cl’;
mPu.alrtClass = ‘mpop_al’;
mPu.spcClass = [‘mpop_title’,’mpop_alt’,’mpop_href’,’mpop_src’];
mPu.attDTitle = [‘Title:’,’Alt:’,’Address:’,’Source:’]
mPu.alertPattern = [”,”,/^(\s*javascript\:)/i,”]
mPu.alertToPri = false;
mPu.alertInstant = false;
mPu.attDNAWA = [true,true,false,false];
mPu.xOfst = 15;
mPu.yOfst = 15;
mPu.clipSteps = 3;
mPu.revStyle = 0;
mPu.revInt = 10;
mPu.warpSteps = 10;
mPu.preload = true;
mPu.edgeBufferZone = 32;
mPu.tTags = [“*”];
mPu.ttipZIndex = “9999”;
mPu.autoSelfFocus = true;
mPu.forceBreakAt = 29; //minimum number of chars needed to force a break, is applied to attributes with ‘forcewordwrap’ on.
mPu.brokenSign = ‘<span class=”mpopbrspan”>»</span><br />’
//new with 2001
mPu.allowSuppress = true;
//version
mPu.embeddedPrefsVersion = 2004;

mPu.defCSS = ‘/* embedded css version 2.02 Skin Name: Minimal Transparent */’
+’#mpopupc, #mpopdblprnt, #mpopupdbl {‘
+’ color: black !important; width: auto !important; height: auto !important;’
+’ padding: 0 !important; margin: 0 !important; position: absolute; top: 0; left: 0;’
+’ background: #EEE none !important; text-align: left !important}’
+’#mpopdblprnt {padding:1px !important; max-width:80% !important;}’
+’#mpopdbl {position: relative;}’
+’#mpopupc, #mpopdbl, #mpopdbl div, #mpopupc div, #mpopbod div, #mpopbod>div>div>div {‘
+’ font: 12px “Trebuchet MS”, Trebuchet, Verdana, Sans-Serif !important;’
+’ border-width: 0 !important; margin: 0; padding: 0; }’
+’#mpopupc {‘
+’background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABuSURBVHja7NAxDQAwCAAwwL%2FGedhPAj5IK6E5%2FV8QpUCECBEiRIgQIUKECBEiRIgQIUKECBEiRIgQIUKECBEiRIgQIUKECBEiECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChIgLVgABBgDHFAROmd3kzgAAAABJRU5ErkJggg%3D%3D) !important;’
+’border: 2px solid #222 !important; opacity: 0.9; padding: 0.2em 0.3em !important;}’
+’#mpoptop {display:none}’
+’#mpopbot {display:none}’
+’#mpopbod {‘
+’ padding:0 !important; margin: 0 !important; border-width: 0 !important;}’
+’#mpopbod>div {‘
+’ padding:0 !important; margin: 0 !important; border-width: 0 !important;}’
+’#mpopbod>div>div {‘
+’ position:relative;’
+’ padding:1px !important; margin: 0 !important; border-width: 0 !important;}’
+’#mpopbod>div>div>div { margin:0 !important; word-wrap: break-word;}’
+’#mpopdbl { max-width: 320px !important; margin: 0 !important; padding: 0 1px !important; word-wrap: break-word;}’
+’#bmtest { top: 0; left: 0; position: absolute; border-width: 0 !important; margin: 0 !important; }’
+’span.mpop_cl, span.mpop_al {‘
+’ font-weight: bold; background-color: #1F2C2F; color: #EAE9DA; font-style: italic;’
+’ font-variant: small-caps; font-size: 90%; padding: 0 0.6em 0 0.3em; margin-right: 0.3em;}’
+’span.mpop_al {background-color: red}’
+’span.mpopbrspan {color: red;}’

;

//not for modification.
mPu.minimumReqPrefsV = 2002;

if (allowRemotePrefs && mPu.setMPPrefsExternal && mPu.minimumReqPrefsV <= mPu.prefsVersion) mPu.setMPPrefsExternal();
else if (!mPu.noExtPrefs) {
if (window.opera&&opera.postError) opera.postError (“Multipopup Error:\nMinimum required prefs version is:”+mPu.minimumReqPrefsV+”\nExternal prefs version installed:”+mPu.prefsVersion+’\n Using internal preferences instead.\nIf you delete the external prefs or update it to the latest, this warning will not be displayed.’);
}

if (allowRemotePrefs && mPu.setRemotePrefs) mPu.setRemotePrefs();

if (typeof(mPu.appendToExistingCSS) != ‘undefined’) {
if (mPu.appendToExistingCSS) mPu.defCSS += mPu.setMPSkinExternal();
else mPu.defCSS = mPu.setMPSkinExternal();
}

}

}

Satu Tanggapan

  1. […] What Alex said was making sense to me. WP doesn’t allow Javascript, the <script> will be stripped out, leaving the bear code scattered over the postings. That’s the thing. The code seemed to be injected somehow by some part of the system. Alex mentioned Firefox extension, but it’s hard to check one by one, I have many of them. So I started with the Javascript code itself. And it turns that this is not a hard thing to do. The URL of authour website is written in the commented part of the code, and I loaded it right away. There I found the link to the so-called MutilPopup UserJS. […]

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: