فلوس من حيث لا تحتسب .. 4 أبراج على موعد مع ثروة ضمة في نهاية أبريل – كارمن شماسC


علشان متقولش مكنتش تعرف .. تحذير عاجل من الأطباء: 5 علامات فساد اللحوم الحمراء تكشف وجود سموم قاعرفيها فورًا فورًا


07 يونيو, 2025 02:00 ص

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

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

runYoutubeLazyLoad();

}

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

” +

‘ +

‘ +

‘ +
‘ +

‘ +

‘;

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

‘;

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

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

loadfbApi();

var html=”


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

}

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

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

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

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

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

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

}

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

characteristic replaceElementWithHtml(ingredient, html) {
var str = html;
var Obj = ingredient; //any ingredient to be totally modified
if (Obj.outerHTML) { //if outerHTML is supported
Obj.outerHTML = str; ///or now now not it is easy replacement of entire ingredient with contents of str var
} else { //if outerHTML is now now not supported, there would possibly maybe be a bizarre but crossbrowsered trick
var tmpObj = doc.createElement(“div”);
tmpObj.innerHTML = ‘‘;
ObjParent = Obj.parentNode; //Okey, ingredient ought to be parented
ObjParent.replaceChild(tmpObj, Obj); //here we placing our non permanent recordsdata in resolution to our design, so we are able to search out it then and substitute it into whatever we want to interchange to
ObjParent.innerHTML = ObjParent.innerHTML.substitute(‘

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

for (var i = 0; i < youtube.size; i++) { var source = "https://img.youtube.com/vi/" + youtube(i).dataset.embed + "http://192.168.2.55/0.jpg"; var portray = fresh Record(); portray.src = "https://www.christian-dogma.com/subject issues/ch/sources/photography/no.jpg"; portray.classList.add('lazyload'); portray.setAttribute("recordsdata-src", source); portray.setAttribute("alt", "youtube"); portray.addEventListener("load", characteristic () { youtube(i).appendChild(portray); }(i)); youtube(i).addEventListener("click on", characteristic () { 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