4 أبراج فلكية الأكثر عرضة للحسد في النصف الثاني من أبريل 2025. هل برجك منهم؟


هل الـ كتافاست يسب فشل كلوي؟ تحدي كتافاسات يغو تيك تيك توك توك يكشفون مخاطره


25 يونيو, 2025 03:43 م

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

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

runYoutubeLazyLoad();

}

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

” +
‘ +
‘ +
‘ +
‘ +

‘ +

‘;

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

‘;

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

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

loadfbApi();

var html=”


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

}

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

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

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

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

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

if (fbRegex.take a look at(url)) {
return {
provide: “Fb”,
url: url,
identification: fbRegex.exec(url)(1)
};

}

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

characteristic replaceElementWithHtml(part, html) {
var str = html;
var Obj = part; //any part to be totally replaced
if (Obj.outerHTML) { //if outerHTML is supported
Obj.outerHTML = str; ///it is uncomplicated replace of complete part with contents of str var
} else { //if outerHTML is no longer supported, there may maybe be a uncommon but crossbrowsered trick
var tmpObj = describe.createElement(“div”);
tmpObj.innerHTML = ‘‘;
ObjParent = Obj.parentNode; //Okey, part wants to be parented
ObjParent.replaceChild(tmpObj, Obj); //here we placing our brief data as an alternative of our purpose, so we are in a position to secure it then and replace it into no matter we must replace to
ObjParent.innerHTML = ObjParent.innerHTML.replace(‘

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

for (var i = 0; i < youtube.size; i++) { var provide = "https://img.youtube.com/vi/" + youtube(i).dataset.embed + "http://192.168.2.55/0.jpg"; var image = unique Image(); image.src = "https://www.christian-dogma.com/subject issues/ch/resources/photos/no.jpg"; image.classList.add('lazyload'); image.setAttribute("data-src", provide); image.setAttribute("alt", "youtube"); image.addEventListener("load", characteristic () { youtube(i).appendChild(image); }(i)); youtube(i).addEventListener("click on", characteristic () { var iframe = describe.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