أسعار الخروات في الأسواق | الحق والضلال
قبل عيد الاضحى الموز البلدي يسجل 36 جنيها والطماطم 4 …. أسعار الخروات والفاكهightly
03 يونيو, 2025 10:08 ص
characteristic replaceOembeds() {
var allEmbeds = doc.getElementsByTagName(“OEMBED”);
while (allEmbeds.length != 0) {
replaceOembedWithHtml(allEmbeds(0), extractLinkFromOembed(allEmbeds(0)));
allEmbeds = doc.getElementsByTagName(“OEMBED”);
}
runYoutubeLazyLoad();
}
characteristic replaceOembedWithHtml(aspect, sourceData) {
if (sourceData.source.toLowerCase() === “youtube”) {
var html=”
‘;
replaceElementWithHtml(aspect, html);
} else if (sourceData.source.toLowerCase() === “instagram”) {
var html=”
‘;
replaceElementWithHtml(aspect, html);
} else if (sourceData.source.toLowerCase() === “twitter”) {
var html=”
‘;
replaceElementWithHtml(aspect, html);
} else if (sourceData.source.toLowerCase() === “facebook”) {
loadfbApi();
var html=”
‘
replaceElementWithHtml(aspect, html);
} else {
replaceElementWithHtml(aspect, “”);
}
}
characteristic extractLinkFromOembed(aspect) {
return getUrlSource(aspect.getAttribute(“url”));
}
characteristic getUrlSource(url) {
var ytRegex = /http(?:s?)://(?:www.)?youtu(?:be.com/look?v=|.be/)((w-_)*)(&(amp;)?(w?=)*)?/;
var instaRegex = /(https?://www.)?instagram.com(/p/(w+)/?)/;
var twitterRegex = /twitter.com/.*/role(?:es)?/((^/?)+)/;
var fbRegex = /^https?://www.facebook.com.*/(video(s)?|look|legend|posts)(.php?|/).+$/;
if (ytRegex.take a look at(url)) {
return {
source: “Youtube”,
url: url,
identification: ytRegex.exec(url)(1)
};
}
if (instaRegex.take a look at(url)) {
return {
source: “Instagram”,
url: url,
identification: instaRegex.exec(url)(3)
};
}
if (twitterRegex.take a look at(url)) {
return {
source: “Twitter”,
url: url,
identification: twitterRegex.exec(url)(1)
};
}
if (fbRegex.take a look at(url)) {
return {
source: “Facebook”,
url: url,
identification: fbRegex.exec(url)(1)
};
}
return {
source: “Unknown”,
url: url,
identification: “”
};
}
characteristic replaceElementWithHtml(aspect, html) {
var str = html;
var Obj = aspect; //any aspect to be fully replaced
if (Obj.outerHTML) { //if outerHTML is supported
Obj.outerHTML = str; ///it’s easy substitute of complete aspect with contents of str var
} else { //if outerHTML is now not supported, there’s a odd nevertheless crossbrowsered trick
var tmpObj = doc.createElement(“div”);
tmpObj.innerHTML = ‘‘;
ObjParent = Obj.parentNode; //Okey, aspect ought to be parented
ObjParent.replaceChild(tmpObj, Obj); //here we placing our non eternal files as an substitute of our arrangement, so we are able to search out it then and substitute it into whatever we desire to substitute to
ObjParent.innerHTML = ObjParent.innerHTML.substitute(‘
‘, str);
}
}
characteristic loadfbApi() {
var js = doc.createElement(‘script’);
js.src=”
doc.physique.appendChild(js);
}
characteristic 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 describe = contemporary Image(); describe.src = "https://www.christian-dogma.com/themes/ch/sources/pictures/no.jpg"; describe.classList.add('lazyload'); describe.setAttribute("files-src", source); describe.setAttribute("alt", "youtube"); describe.addEventListener("load", characteristic () { youtube(i).appendChild(describe); }(i)); youtube(i).addEventListener("click", 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 link