This commit is contained in:
parent
bf6f826c9d
commit
a96a0384b2
|
@ -43,7 +43,7 @@ EmoteModule.prototype.init=function(){};EmoteModule.prototype.getBlacklist=funct
|
||||||
return nodes};var bemotes=[];var spoilered=[];EmoteModule.prototype.injectEmote=function(node){var self=this;if(!node.parentElement)return;var parent=$(node).parent();if(!parent.hasClass("markup")&&!parent.hasClass("message-content"))return;function inject(){var contents=parent.contents();contents.each(function(i){if(contents[i]==undefined)return;var nodeValue=contents[i].nodeValue;if(nodeValue==null)return;if(contents[i].nodeType==8)return;contents.splice(i,1);var words=nodeValue.split(/([^\s]+)([\s]|$)/g).filter(function(e){return e});var splice=0;var doInject=!1;var text=null;words.forEach(function(w,index,a){if(w.indexOf("[!s]")>-1){w=w.replace("[!s]","");parent.data("spoilered",!1);parent.addClass("spoiler")}
|
return nodes};var bemotes=[];var spoilered=[];EmoteModule.prototype.injectEmote=function(node){var self=this;if(!node.parentElement)return;var parent=$(node).parent();if(!parent.hasClass("markup")&&!parent.hasClass("message-content"))return;function inject(){var contents=parent.contents();contents.each(function(i){if(contents[i]==undefined)return;var nodeValue=contents[i].nodeValue;if(nodeValue==null)return;if(contents[i].nodeType==8)return;contents.splice(i,1);var words=nodeValue.split(/([^\s]+)([\s]|$)/g).filter(function(e){return e});var splice=0;var doInject=!1;var text=null;words.forEach(function(w,index,a){if(w.indexOf("[!s]")>-1){w=w.replace("[!s]","");parent.data("spoilered",!1);parent.addClass("spoiler")}
|
||||||
var allowedClasses=["flip","spin","pulse","spin2","spin3","1spin","2spin","3spin","tr","bl","br","shake","shake2","shake3","flap"];var useEmoteClass=!1;var emoteClass="";var skipffz=!1;var sw=w;if(w.indexOf(":")>-1){var split=w.split(":");if(split[0]!=""&&split[1]!=""){if(allowedClasses.indexOf(split[1])>-1){sw=split[0];emoteClass=settingsCookie["bda-es-8"]?"emote"+split[1]:""}
|
var allowedClasses=["flip","spin","pulse","spin2","spin3","1spin","2spin","3spin","tr","bl","br","shake","shake2","shake3","flap"];var useEmoteClass=!1;var emoteClass="";var skipffz=!1;var sw=w;if(w.indexOf(":")>-1){var split=w.split(":");if(split[0]!=""&&split[1]!=""){if(allowedClasses.indexOf(split[1])>-1){sw=split[0];emoteClass=settingsCookie["bda-es-8"]?"emote"+split[1]:""}
|
||||||
if(split[1]=="bttv"){sw=split[0];skipffz=!0}}}
|
if(split[1]=="bttv"){sw=split[0];skipffz=!0}}}
|
||||||
if($.inArray(sw,bemotes)==-1){if(typeof emotesTwitch!=='undefind'&&settingsCookie["bda-es-7"]){if(emotesTwitch.emotes.hasOwnProperty(sw)&&sw.length>=4){if(text!=null){contents.splice(i+splice++,0,document.createTextNode(text));text=null}
|
if($.inArray(sw,bemotes)==-1){if(typeof emotesTwitch!=='undefined'&&settingsCookie["bda-es-7"]){if(emotesTwitch.emotes.hasOwnProperty(sw)&&sw.length>=4){if(text!=null){contents.splice(i+splice++,0,document.createTextNode(text));text=null}
|
||||||
var url=twitchEmoteUrlStart+emotesTwitch.emotes[sw].image_id+twitchEmoteUrlEnd;contents.splice(i+splice++,0,self.createEmoteElement(sw,url,emoteClass));doInject=!0;return}}
|
var url=twitchEmoteUrlStart+emotesTwitch.emotes[sw].image_id+twitchEmoteUrlEnd;contents.splice(i+splice++,0,self.createEmoteElement(sw,url,emoteClass));doInject=!0;return}}
|
||||||
if(typeof subEmotesTwitch!=='undefined'&&settingsCookie["bda-es-7"]){if(subEmotesTwitch.hasOwnProperty(sw)&&sw.length>=4){if(text!=null){contents.splice(i+splice++,0,document.createTextNode(text));text=null}
|
if(typeof subEmotesTwitch!=='undefined'&&settingsCookie["bda-es-7"]){if(subEmotesTwitch.hasOwnProperty(sw)&&sw.length>=4){if(text!=null){contents.splice(i+splice++,0,document.createTextNode(text));text=null}
|
||||||
var url=twitchEmoteUrlStart+subEmotesTwitch[sw]+twitchEmoteUrlEnd;contents.splice(i+splice++,0,self.createEmoteElement(sw,url,emoteClass));doInject=!0;return}}
|
var url=twitchEmoteUrlStart+subEmotesTwitch[sw]+twitchEmoteUrlEnd;contents.splice(i+splice++,0,self.createEmoteElement(sw,url,emoteClass));doInject=!0;return}}
|
||||||
|
|
Loading…
Reference in New Issue