اشترى وانت الكسبان .. س الذهب بمنتصف تعاملات اليوم الخميس 19 يونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيونيو


سمير فرج يشيد بـكلمة الرئيس السيسي ويسي ويقول: “أمريكا قد تضر للض على الكيان للتهدئة”


15 سبتمبر, 2025 10:33 م

characteristic replaceOembeds() {
var allEmbeds = file.getElementsByTagName(“OEMBED”);

while (allEmbeds.measurement != 0) {
replaceOembedWithHtml(allEmbeds(0), extractLinkFromOembed(allEmbeds(0)));
allEmbeds = file.getElementsByTagName(“OEMBED”);
}

runYoutubeLazyLoad();

}

characteristic replaceOembedWithHtml(element, sourceData) {
if (sourceData.offer.toLowerCase() === “youtube”) {
var html=”

” +
‘ +
‘ +
‘ +
‘ +

‘ +

‘;

replaceElementWithHtml(element, html);
} else if (sourceData.offer.toLowerCase() === “instagram”) {
var html=”

‘;

replaceElementWithHtml(element, html);
} else if (sourceData.offer.toLowerCase() === “twitter”) {
var html=”

‘;
replaceElementWithHtml(element, html);
} else if (sourceData.offer.toLowerCase() === “fb”) {

loadfbApi();

var html=”


replaceElementWithHtml(element, html);
} else {
replaceElementWithHtml(element, “”);
}

}

characteristic extractLinkFromOembed(element) {
return getUrlSource(element.getAttribute(“url”));
}

characteristic getUrlSource(url) {
var ytRegex = /http(?:s?)://(?:www.)?youtu(?:be.com/look for?v=|.be/)((w-_)*)(&(amp;)?‌​(w?‌​=)*)?/;
var instaRegex = /(https?://www.)?instagram.com(/p/(w+)/?)/;
var twitterRegex = /twitter.com/.*/reputation(?:es)?/((^/?)+)/;
var fbRegex = /^https?://www.fb.com.*/(video(s)?|look for|legend|posts)(.php?|/).+$/;

if (ytRegex.take a look at(url)) {
return {
offer: “Youtube”,
url: url,
identity: ytRegex.exec(url)(1)
};
}

if (instaRegex.take a look at(url)) {
return {
offer: “Instagram”,
url: url,
identity: instaRegex.exec(url)(3)
};
}

if (twitterRegex.take a look at(url)) {
return {
offer: “Twitter”,
url: url,
identity: twitterRegex.exec(url)(1)
};
}

if (fbRegex.take a look at(url)) {
return {
offer: “Facebook”,
url: url,
identity: fbRegex.exec(url)(1)
};

}

return {
offer: “Unknown”,
url: url,
identity: “”
};
}

characteristic replaceElementWithHtml(element, html) {
var str = html;
var Obj = element; //any element to be totally changed
if (Obj.outerHTML) { //if outerHTML is supported
Obj.outerHTML = str; ///or now not it is straightforward alternative of complete element with contents of str var
} else { //if outerHTML is now not supported, there is a uncommon nonetheless crossbrowsered trick
var tmpObj = file.createElement(“div”);
tmpObj.innerHTML = ‘‘;
ObjParent = Obj.parentNode; //Okey, element may most certainly most certainly contain to be parented
ObjParent.replaceChild(tmpObj, Obj); //right here we placing our non everlasting information as a alternative of our aim, so we can salvage it then and change it into whatever we desire to change to
ObjParent.innerHTML = ObjParent.innerHTML.change(‘

‘, str);
}
}
characteristic loadfbApi() {
var js = file.createElement(‘script’);
js.src=”
file.physique.appendChild(js);
}
characteristic runYoutubeLazyLoad() {
/// youtube lazyload
var youtube = file.querySelectorAll(“.youtube”);

for (var i = 0; i < youtube.measurement; i++) { var offer = "https://img.youtube.com/vi/" + youtube(i).dataset.embed + "http://192.168.2.55/0.jpg"; var image = new Image(); image.src = "https://www.christian-dogma.com/issues/ch/resources/pictures/no.jpg"; image.classList.add('lazyload'); image.setAttribute("information-src", offer); image.setAttribute("alt", "youtube"); image.addEventListener("load", characteristic () { youtube(i).appendChild(image); }(i)); youtube(i).addEventListener("click on", characteristic () { var iframe = file.createElement("iframe"); iframe.setAttribute("frameborder", "0"); iframe.setAttribute("allowfullscreen", ""); iframe.setAttribute("src", "https://www.youtube.com/embed/" + this.dataset .embed + "?rel=0&showinfo=0&autoplay=1"); this.innerHTML = ""; this.appendChild(iframe); }); }; }

Source link

Exit mobile version