home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
fil3E2743F2B07D0A52B7280292A78C2DBB
< prev
next >
Wrap
Text File
|
2010-07-12
|
2KB
|
77 lines
var Bloggers = window.opener.Ya.Bloggers;
var BloggersWindow = {
onLoad: function() {
let AppInfo = window.opener.Ya.nsIYa.AppInfo;
if (AppInfo.OS.isWindows && AppInfo.browser.isGreaterThenFx30) {
let shadowAttribute = document.createAttribute("yashadow");
shadowAttribute.value = "window";
document.documentElement.attributes.setNamedItem(shadowAttribute);
}
window.sizeToContent();
let position = Bloggers.savedPosition ||
{ x: screen.availLeft + screen.availWidth - window.outerWidth - 10,
y: screen.availTop + screen.availHeight - window.outerHeight - 10 };
window.moveTo(position.x, position.y);
BloggersWindow.checkWindowVisible();
Bloggers.refreshData(false, true);
},
onUnload: function() {
},
_visiblePixels: 40,
checkWindowVisible: function() {
let x = 0,
y = 0;
let xDiff = window.screenX + window.outerWidth - this._visiblePixels;
if (xDiff < 0) {
x = xDiff;
} else {
xDiff = window.screenX - (screen.availLeft + screen.availWidth - this._visiblePixels);
if (xDiff > 0)
x = xDiff;
}
let yDiff = window.screenY;
if (yDiff < 0) {
y = yDiff;
} else {
yDiff = window.screenY - (screen.availTop + screen.availHeight - this._visiblePixels);
if (yDiff > 0)
y = yDiff;
}
if (x == 0 && y == 0)
return;
this.handleMouseMove({x: x, y: y});
},
handleMouseMove: function(aDiff) {
let x = window.screenX - aDiff.x;
let y = window.screenY - aDiff.y;
if (x < (-window.outerWidth + this._visiblePixels) ||
x > (screen.availLeft + screen.availWidth - this._visiblePixels))
aDiff.x = 0;
if (y < 0 ||
y > (screen.availTop + screen.availHeight - this._visiblePixels))
aDiff.y = 0;
if (aDiff.x == 0 && aDiff.y == 0)
return;
window.moveTo(window.screenX - aDiff.x, window.screenY - aDiff.y);
Bloggers.savedPosition = {x: window.screenX, y: window.screenY};
}
}