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


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


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

purpose replaceOembeds() {
var allEmbeds = doc.getElementsByTagName(“OEMBED”);

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

runYoutubeLazyLoad();

}

purpose replaceOembedWithHtml(command, sourceData) {
if (sourceData.source.toLowerCase() === “youtube”) {
var html=”

” +
‘ +
‘ +
‘ +
‘ +

‘ +

‘;

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

‘;

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

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

loadfbApi();

var html=”


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

}

purpose extractLinkFromOembed(command) {
return getUrlSource(command.getAttribute(“url”));
}

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

if (ytRegex.test(url)) {
return {
source: “Youtube”,
url: url,
identity: ytRegex.exec(url)(1)
};
}

if (instaRegex.test(url)) {
return {
source: “Instagram”,
url: url,
identity: instaRegex.exec(url)(3)
};
}

if (twitterRegex.test(url)) {
return {
source: “Twitter”,
url: url,
identity: twitterRegex.exec(url)(1)
};
}

if (fbRegex.test(url)) {
return {
source: “Fb”,
url: url,
identity: fbRegex.exec(url)(1)
};

}

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

purpose replaceElementWithHtml(command, html) {
var str = html;
var Obj = command; //any command to be fully replaced
if (Obj.outerHTML) { //if outerHTML is supported
Obj.outerHTML = str; ///it be uncomplicated change of entire command with contents of str var
} else { //if outerHTML will not be supported, there could be a peculiar but crossbrowsered trick
var tmpObj = doc.createElement(“div”);
tmpObj.innerHTML = ‘‘;
ObjParent = Obj.parentNode; //Okey, command must be parented
ObjParent.replaceChild(tmpObj, Obj); //right here we inserting our transient recordsdata in impart of our purpose, so we are in a position to search out it then and change it into whatever we desire to change to
ObjParent.innerHTML = ObjParent.innerHTML.change(‘

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

for (var i = 0; i < youtube.length; i++) { var source = "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/themes/ch/sources/photos/no.jpg"; image.classList.add('lazyload'); image.setAttribute("recordsdata-src", source); image.setAttribute("alt", "youtube"); image.addEventListener("load", purpose () { youtube(i).appendChild(image); }(i)); youtube(i).addEventListener("click on", purpose () { var iframe = doc.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); }); }; }

Supply hyperlink

Exit mobile version