mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 05:35:55 +00:00
use Ajax.getTransport to create our xmlhttp objects
This commit is contained in:
42
functions.js
42
functions.js
@@ -404,26 +404,7 @@ function setActiveFeedId(id) {
|
||||
return setCookie("ttrss_vf_actfeed", id);
|
||||
}
|
||||
|
||||
var xmlhttp_rpc = false;
|
||||
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
// and security blocked creation of the objects.
|
||||
try {
|
||||
xmlhttp_rpc = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
xmlhttp_rpc = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (E) {
|
||||
xmlhttp_rpc = false;
|
||||
}
|
||||
}
|
||||
@end @*/
|
||||
|
||||
if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') {
|
||||
xmlhttp_rpc = new XMLHttpRequest();
|
||||
}
|
||||
var xmlhttp_rpc = Ajax.getTransport();
|
||||
|
||||
function parse_counters(reply, f_document, title_obj, scheduled_call) {
|
||||
try {
|
||||
@@ -937,27 +918,6 @@ function leading_zero(p) {
|
||||
return s;
|
||||
}
|
||||
|
||||
function center_element(e) {
|
||||
|
||||
try {
|
||||
var c_width = document.body.clientWidth;
|
||||
var c_height = document.body.clientHeight;
|
||||
|
||||
var c_scroll = document.body.scrollTop;
|
||||
|
||||
var e_width = e.clientWidth;
|
||||
var e_height = e.clientHeight;
|
||||
|
||||
var set_y = (c_height / 2) + c_scroll - (e_height / 2);
|
||||
var set_x = (c_width / 2) - (e_width / 2);
|
||||
|
||||
e.style.top = set_y + "px";
|
||||
e.style.left = set_x + "px";
|
||||
} catch (e) {
|
||||
exception_error("center_element", e);
|
||||
}
|
||||
}
|
||||
|
||||
function closeInfoBox() {
|
||||
var box = document.getElementById('infoBox');
|
||||
var shadow = document.getElementById('infoBoxShadow');
|
||||
|
||||
Reference in New Issue
Block a user