SHARE
TWEET

tsviewer FR translation

Zalati Oct 11th, 2017 186 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var TSV=TSV||{};TSV.ViewerScript={Helper:{getInnerViewerDiv:function(regId)
  2. {return document.getElementById('ts3v_'+ regId);},getOuterViewerDiv:function(regId)
  3. {return document.getElementById('ts3viewer_'+ regId);},storageAvailable:function(type)
  4. {try
  5. {var storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return true;}
  6. catch(e)
  7. {return false;}}},Loader:{staticFilesUrl:'https://static.tsviewer.com/',pageUrl:'https://www.tsviewer.com/',scriptLoaders:{},styleSheetGenerators:{},urlParsers:{},ScriptLoader:function(url,onLoadCallback,onErrorCallback)
  8. {this.url=url;this.onLoadCallback=onLoadCallback;this.onErrorCallback=onErrorCallback;this.element=null;this.createAndAppend=function()
  9. {this.element=document.createElement('script');this.element.type='text/javascript';this.element.charset='utf-8';this.element.async=1;this.element.src=this.url;document.head.appendChild(this.element);this.element.onload=this.onLoadCallback;this.element.onerror=this.onErrorCallback;};this.remove=function()
  10. {document.head.removeChild(this.element);}},UrlParser:function(url)
  11. {this.url=url;this.parsed=null;this.getUrl=function()
  12. {return this.url;};this.getParsed=function()
  13. {if(this.parsed==null)
  14. {this.parse();}
  15. return this.parsed;};this.parse=function()
  16. {var vars={};this.url.replace
  17. (/[?&]+([^=&]+)=?([^&]*)?/gi,function(m,key,value)
  18. {if(typeof value=='undefined')
  19. {value=null;}
  20. vars[key]=value;});this.parsed=vars;};},StyleSheetGenerator:function(params)
  21. {this.params=params;this.generatedCss=null;this.element=null;this.getCss=function()
  22. {if(this.generatedCss===null)
  23. {this.generate();}
  24. return this.generatedCss;};this.append=function()
  25. {this.element=document.createElement('style');this.element.type='text/css';this.element.innerHTML=this.getCss();document.head.appendChild(this.element);};this.remove=function()
  26. {document.head.removeChild(this.element);};this.generate=function()
  27. {var sl='#'+'ts3v_'+ this.getValue('ID');var css='';css+=sl+' * '+'{'+'border: 0;'+'margin: 0;'+'padding: 0;'+'line-height: inherit;'+'}'+
  28. sl+'{'+'display: block;'+'width: 100%;'+'height: 100%;'+'text-align: left !important;'+'line-height: 16px;'+'overflow: auto;'+'padding-bottom: 4px;'+'}'+
  29. sl+', '+
  30. sl+' small, '+
  31. sl+' .tsv_server a:link, '+
  32. sl+' .tsv_server a:visited, '+
  33. sl+' .tsv_server a:active, '+
  34. sl+' .tsv_server a:hover, '+
  35. sl+' .tsv_serverinfo, '+
  36. sl+' .tsv_serverinfo a:link, '+
  37. sl+' .tsv_serverinfo a:visited, '+
  38. sl+' .tsv_serverinfo a:active, '+
  39. sl+' .tsv_serverinfo:hover, '+
  40. sl+' .tsv_serverinfo:hover a:hover, '+
  41. sl+' .tsv_channel, '+
  42. sl+' .tsv_channel:hover, '+
  43. sl+' .tsv_user, '+
  44. sl+' .tsv_user a:link, '+
  45. sl+' .tsv_user a:visited, '+
  46. sl+' .tsv_user a:active, '+
  47. sl+' .tsv_user:hover, '+
  48. sl+' .tsv_user:hover a:hover, '+
  49. sl+' .tsv_spacer, '+
  50. sl+' .tsv_content '+'{'+
  51. this.getRule('color',this.getColor('text'))+
  52. this.getRule('font-family',this.getFontFamily())+
  53. this.getRule('font-size',this.getPixelSize('text_size'))+'}'+
  54. sl+' .tsv_level '+'{'+'line-height: 1.5;'+'clear: both;'+'white-space: nowrap;'+'}'+
  55. sl+'.hideEmptyChannels .tsv_channel.tsv_empty, '+
  56. sl+'.hideEmptyChannels .tsv_spacer.tsv_empty '+'{'+'display: none;'+'}'+
  57. sl+'.hideEmptyChannels .tsv_channel '+'{'+'margin-top: 4px !important;'+'}'+
  58. sl+' .tsv_serverinfo '+'{'+'margin-bottom: 4px !important;'+'}'+
  59. sl+'.hideEmptyChannels .tsv_serverinfo '+'{'+'margin-bottom: 0 !important;'+'}'+
  60. sl+'.hideEmptyChannels .tsv_level.tsv_channel .tsv_content, '+
  61. sl+'.hideEmptyChannels .tsv_level.tsv_spacer .tsv_content '+'{'+'padding-left: 0 !important;'+'}'+
  62. sl+'.hideEmptyChannels .tsv_level.tsv_user .tsv_content '+'{'+'padding-left: 40px !important;'+'}'+
  63. sl+'.hideFlags .tsv_level.tsv_user .tsv_suffix .tsv_flag '+'{'+'display: none !important;'+'}';for(var i=0;i<=8;i++)
  64. {css+=sl+' .tsv_level .tsv_content.tsv_depth_'+ i+'{'+'padding-left: '+(i*20)+'px'+'}';}
  65. css+=sl+' .tsv_content '+'{'+'box-sizing: border-box;'+'-moz-box-sizing: border-box;'+'-webkit-box-sizing: border-box;'+'background: none !important;'+'background-color: transparent !important;'+'float: none !important;'+'width: auto !important;'+'}'+
  66. sl+' .tsv_level .tsv_content:before, '+
  67. sl+' .tsv_level .tsv_content:after, '+
  68. sl+' .tsv_user:before, '+
  69. sl+' .tsv_user:after, '+
  70. sl+' .tsv_user .tsv_flag:before, '+
  71. sl+' .tsv_user .tsv_flag:after '+'{'+'content: initial;'+'display: none;'+'clear: none;'+'}'+
  72. sl+' .tsv_level img '+'{'+'vertical-align: text-top;'+'height: 16px;'+'width: 16px;'+'}'+
  73. sl+' .tsv_suffix '+'{'+'float: right;'+'position: relative;'+'text-align: right;'+'}'+
  74. sl+' .tsv_suffix i '+'{'+'margin-left: 3px;'+'}'+
  75. sl+' .tsv_prefixIcon '+'{'+'margin-right: 6px;'+'}'+
  76. sl+' .tsv_left '+'{'+'text-align: left;'+'}'+
  77. sl+' .tsv_center '+'{'+'text-align: center;'+'}'+
  78. sl+' .tsv_right '+'{'+'text-align: right;'+'}'+
  79. sl+' .tsv_server a:link, '+ sl+' .tsv_server a:visited '+'{'+
  80. this.getDefaultDefinition('text_s',false)+'}'+
  81. sl+' .tsv_server a:active, '+ sl+' .tsv_server a:hover '+'{'+
  82. this.getDefaultDefinition('text_s',true)+'}'+
  83. sl+' .tsv_serverinfo a:link, '+ sl+' .tsv_serverinfo a:visited'+'{'+
  84. this.getDefaultDefinition('text_i',false)+'}'+
  85. sl+' .tsv_serverinfo a:active, '+ sl+' .tsv_serverinfo a:hover '+'{'+
  86. this.getDefaultDefinition('text_i',true)+'}'+
  87. sl+' .tsv_channel .tsv_content '+'{'+
  88. this.getDefaultDefinition('text_c',false)+'}'+
  89. sl+' .tsv_channel:hover .tsv_content '+'{'+
  90. this.getDefaultDefinition('text_c',true)+'}'+
  91. sl+' .tsv_user, '+ sl+' .tsv_user a:link, '+ sl+' .tsv_user a:visited, '+ sl+' .tsv_user a:active '+'{'+
  92. this.getDefaultDefinition('text_u',false)+'}'+
  93. sl+' .tsv_user:hover, '+ sl+' .tsv_user:hover a:hover '+'{'+
  94. this.getDefaultDefinition('text_u',true)+'}'+
  95. sl+' .tsv_user .tsv_content .ts3v_user_tooltip '+'{'+'display: none !important;'+'position: absolute;'+'z-index: 100;'+'background-color: white;'+'color: grey;'+'font-size: 11px;'+'font-weight: normal;'+'width: 127px;'+'overflow: hidden;'+'padding: 3px;'+'border-radius: 3px;'+'box-sizing: border-box;'+'box-shadow: 0 1px 3px #888;'+'}'+
  96. sl+' .tsv_user .tsv_content .ts3v_user_tooltip div label '+'{'+'color: grey;'+'white-space: nowrap;'+'display: inline-block;'+'width: 48px;'+'font-size: 11px;'+'font-weight: normal;'+'font-family: inherit;'+'text-align: right;'+'padding-right: 8px;'+'line-height: inherit;'+'}'+
  97. sl+' .tsv_user .tsv_content .ts3v_user_tooltip div span '+'{'+'color: black;'+'white-space: nowrap;'+'display: inline-block;'+'font-size: 11px;'+'font-weight: normal;'+'font-family: inherit;'+'line-height: inherit;'+'}'+
  98. sl+' .tsv_user .tsv_content .ts3v_user_tooltip a.boxedLink '+'{'+'display: block !important;'+'color: #545454 !important;'+'background-color: #F1F1F1 !important;'+'font-size: 10px !important;'+'margin-top: 4px !important;'+'margin-bottom: 4px !important;'+'border: 1px solid #d8d8d8 !important;'+'padding: 1px 5px !important;'+'text-align: center !important;'+'font-weight: normal !important;'+'}'+
  99. sl+' .tsv_user .tsv_content .ts3v_user_tooltip a.boxedLink:hover '+'{'+'color: #000000 !important;'+'background-color: #ffcc00 !important;'+'border: 1px solid #d78e00 !important;'+'}'+
  100. sl+' .tsv_user .tsv_content .ts3v_user_tooltip .tsv_userBanner '+'{'+'width: 121px;'+'height: 23px;'+'display: block;'+'}'+
  101. sl+' .tsv_user:hover .tsv_content .ts3v_user_tooltip '+'{'+'display: block !important;'+'}';var iconsPath=TSV.ViewerScript.Loader.staticFilesUrl+'images/ts3/';var iconSet=this.getValue('iconset','default');var viewerImages=['host','tree','group_icon_100','group_icon_200','group_icon_300','group_icon_400','group_icon_500','group_icon_600','channel_full','channel_pass','channel_open','channel_flag_default','channel_flag_password','channel_flag_music','channel_flag_moderated','client_away','client_priority','client_cc','client_idle','client_talker','client_mic_muted','client_mic_disabled','client_snd_disabled','client_snd_muted','client_cc_talk','client_cc_idle'];var flagImages=['ad','ae','af','ag','ai','al','am','an','ao','ar','as','at','au','aw','ax','az','ba','bb','bd','be','bf','bg','bh','bi','bj','bl','bm','bn','bo','br','bs','bt','bv','bw','by','bz','ca','cc','cd','cf','cg','ch','ci','ck','cl','cm','cn','co','cr','cs','cu','cv','cx','cy','cz','de','dj','dk','dm','do','dz','ec','ee','eg','eh','er','es','et','fi','fj','fk','fm','fo','fr','ga','gb','gd','ge','gf','gg','gh','gi','gl','gm','gn','gp','gq','gr','gs','gt','gu','gw','gy','hk','hm','hn','hr','ht','hu','id','ie','il','im','in','io','iq','ir','is','it','je','jm','jo','jp','ke','kg','kh','ki','km','kn','kp','kr','kw','ky','kz','la','lb','lc','li','lk','lr','ls','lt','lu','lv','ly','ma','mc','md','me','mg','mh','mk','ml','mm','mn','mo','mp','mq','mr','ms','mt','mu','mv','mw','mx','my','mz','na','nc','ne','nf','ng','ni','nl','no','np','nr','nu','nz','om','pa','pe','pf','pg','ph','pk','pl','pm','pn','pr','ps','pt','pw','py','qa','re','ro','rs','ru','rw','sa','sb','sc','sd','se','sg','sh','si','sj','sk','sl','sm','sn','so','sr','st','sv','sy','sz','tc','td','tf','tg','th','tj','tk','tl','tm','tn','to','tr','tt','tv','tw','tz','ua','ug','uk','um','us','uy','uz','va','vc','ve','vg','vi','vn','vu','wf','ws','ye','yt','za','zm','zw'];for(i=0;i<viewerImages.length;i++)
  102. {css+=sl+' i.tsv_viewer.'+ viewerImages[i]+' '+'{'+'background-image: url('+ iconsPath+'viewer/'+ iconSet+'/'+ viewerImages[i]+'.png);'+'}';}
  103. for(i=0;i<flagImages.length;i++)
  104. {css+=sl+' i.tsv_flag.'+ flagImages[i]+' '+'{'+'background-image: url('+ iconsPath+'flags/'+ flagImages[i]+'.png);'+'}';}
  105. css+=sl+' .tsv_level.tsv_spacer.tsv_center i.tsv_viewer.tree, '+
  106. sl+' .tsv_level.tsv_spacer.tsv_right i.tsv_viewer.tree '+'{'+'background-image: none;'+'width: 0 !important;'+'}';css+=sl+' i.tsv_viewer.tree '+'{'+'margin-right: 4px;'+'}';css+=sl+' i '+'{'+'display: inline-block !important;'+'vertical-align: text-bottom !important;'+'background-size: contain !important;'+'background-repeat: no-repeat !important;'+'}'+
  107. sl+' i.tsv_viewer '+'{'+'width: 16px !important;'+'height: 16px !important;'+'}'+
  108. sl+' i.tsv_flag '+'{'+'width: 16px !important;'+'height: 11px !important;'+'vertical-align: middle !important;'+'}';this.generatedCss=css;};this.getDefaultDefinition=function(key,isHover)
  109. {var css='';var keySuffix='';if(isHover)
  110. {keySuffix='_h';}
  111. css+='display: inline !important;'+'text-align: left !important;'+
  112. this.getRule('color',this.getColor(key+'_color'+ keySuffix))+
  113. this.getRuleWithKey('font-weight',key+'_weight'+ keySuffix,null)+
  114. this.getRuleWithKey('font-style',key+'_style'+ keySuffix,null)+
  115. this.getRuleWithKey('font-variant',key+'_variant'+ keySuffix,null)+
  116. this.getRuleWithKey('text-decoration',key+'_decoration'+ keySuffix,'none');return css;};this.getRuleWithKey=function(property,key,defaultValue)
  117. {return this.getRule(property,this.getValue(key,defaultValue));};this.getRule=function(property,value)
  118. {if(value!==null)
  119. {return property+': '+ value+' !important;';}
  120. else
  121. {return'';}};this.getColor=function(key)
  122. {var value=null;if(key!='text')
  123. {value=this.getValue(key);}
  124. if(value===null)
  125. {value=this.getValue('text');}
  126. if(value!==null)
  127. {return'#'+ value;}
  128. else
  129. {return value;}};this.getPixelSize=function(key)
  130. {var value=this.getValue(key);if(value!==null)
  131. {return value+'px';}
  132. else
  133. {return value;}};this.getValue=function(key,defaultValue)
  134. {if(typeof this.params[key]!='undefined'&&this.params[key]!==null)
  135. {return this.params[key];}
  136. else
  137. {if(typeof defaultValue!='undefined')
  138. {return defaultValue;}
  139. return null;}};this.getFontFamily=function()
  140. {var param=this.getValue('text_family');if(param!==null)
  141. {switch(param)
  142. {case'2':return"Times New Roman, Times, serif";case'3':return"Georgia, Times New Roman, Times, serif";case'4':return"Verdana, Arial, Helvetica, sans-serif";case'5':return"Arial, Helvetica, sans-serif";case'6':return"inherit";}}
  143. return"'Segoe UI', FreeSans, sans-serif";};},init:function(url,regId,maxRepetitions)
  144. {if(this.blockUnauthorizedApp(regId))
  145. {return;}
  146. this.urlParsers[regId]=new this.UrlParser(url);this.styleSheetGenerators[regId]=new this.StyleSheetGenerator(this.urlParsers[regId].getParsed());this.styleSheetGenerators[regId].append();this.load(regId);},blockUnauthorizedApp:function(regId)
  147. {if(window.location.hostname=='bploeg.com')
  148. {var message='<div style="font-family: Roboto, sans-serif;">';message+='<div style="font-size: 14px; margin-bottom: 24px;">This unauthorized App has been replaced by the TSViewer.com WebApp. Get it on Google Play.</div>';message+='<div style="background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 8px; margin: 8px;" onclick="window.location.href=\'https://play.google.com/store/apps/details?id=com.tsviewer.webapp\'">';message+='<img style="display: inline-block; vertical-align: middle; width: 42px; margin-right: 16px;" src="https://lh3.googleusercontent.com/3S-JzTDrxSDQ84O0MtFuaxYrjqffmxWa05Y5BPyQKpjBpsIsVZS-w1G9DwRInehQUg=w300-rw">';message+='<div style="display: inline-block; vertical-align: middle;"><div style="font-size: 16px;">TSViewer.com</div><div style="font-size: 12px; color: grey;">Viewer for TeamSpeak 3</div></div>';message+='</div>';message+='<a style="clear: both; display: block; margin-top: 32px;" href="https://play.google.com/store/apps/details?id=com.tsviewer.webapp"><img src="'+ TSV.ViewerScript.Loader.staticFilesUrl+'images/play_store_badge_bright.png" style="width: 106px; float: right;"></a>';message+='</div>';TSV.ViewerScript.Helper.getOuterViewerDiv(regId).innerHTML=message;return true;}
  149. else
  150. {return false;}},load:function(regId)
  151. {var onLoadCallback=function()
  152. {this.finishUpdate(regId,true);}.bind(this);var onErrorCallback=function()
  153. {this.finishUpdate(regId,false);}.bind(this);this.scriptLoaders[regId]=new this.ScriptLoader
  154. (this.urlParsers[regId].getUrl(),onLoadCallback,onErrorCallback);this.scriptLoaders[regId].createAndAppend();TSV.ViewerScript.Helper.getOuterViewerDiv(regId).innerHTML=' <img src="'+ this.staticFilesUrl+'/images/loading_14.svg" alt="" title="'+ regId+'" /> Consultation TS3 avec <a href="'+ this.pageUrl+'" target="_blank">TSViewer.com</a>';},finishUpdate:function(regId,success)
  155. {var html;if(!success)
  156. {html='Impossible de charger le TSViewer<br>Veuillez signaler ce problème sur le twitter @Zalati_';}
  157. else
  158. {html=TSV.ViewerScript.Data[regId]['html'];}
  159. TSV.ViewerScript.Helper.getOuterViewerDiv(regId).innerHTML=html;if(typeof TSV.TsviewerPage!='undefined'&&typeof TSV.TsviewerPage.receiveData=='function')
  160. {TSV.TsviewerPage.receiveData();}
  161. else
  162. {this.applyLocalStoragePreferences(regId);}
  163. if(typeof displayClientData=='undefined')
  164. {window.displayClientData=function(div)
  165. {}}
  166. TSV.ViewerScript.ToolTips.addEvents(regId);},refresh:function(regId)
  167. {this.scriptLoaders[regId].remove();delete TSV.ViewerScript.Data[regId];this.load(regId);},setUrl:function(regId,url)
  168. {if(this.urlParsers[regId].getUrl()!=url)
  169. {this.urlParsers[regId]=new this.UrlParser(url);}},redoCss:function(regId)
  170. {this.styleSheetGenerators[regId].remove();this.styleSheetGenerators[regId]=new this.StyleSheetGenerator(this.urlParsers[regId].getParsed());this.styleSheetGenerators[regId].append();},applyLocalStoragePreferences:function(regId)
  171. {if(TSV.ViewerScript.Helper.storageAvailable('localStorage'))
  172. {this.applyLocalStoragePreference_hideEmptyChannels(regId);}
  173. else
  174. {console.info('local storage not available');}},applyLocalStoragePreference_hideEmptyChannels:function(regId)
  175. {var varName='hideEmptyChannels';var userPreference=localStorage.getItem('tsv_'+ regId+'_'+ varName);if(userPreference!==null)
  176. {var viewerClassList=TSV.ViewerScript.Helper.getInnerViewerDiv(regId).classList;if(JSON.parse(userPreference)==true)
  177. {if(!viewerClassList.contains(varName))
  178. {viewerClassList.add(varName);}
  179. else
  180. {}}
  181. else
  182. {if(viewerClassList.contains(varName))
  183. {viewerClassList.remove(varName);}
  184. else
  185. {}}}
  186. else
  187. {}},toggleEmptyChannels:function(regId)
  188. {var varName='hideEmptyChannels';var viewerClassList=TSV.ViewerScript.Helper.getInnerViewerDiv(regId).classList;viewerClassList.toggle(varName);if(TSV.ViewerScript.Helper.storageAvailable('localStorage'))
  189. {localStorage.setItem('tsv_'+ regId+'_'+ varName,viewerClassList.contains(varName));}
  190. else
  191. {}}},ToolTips:{addEvents:function(regId)
  192. {var viewerDiv=TSV.ViewerScript.Helper.getInnerViewerDiv(regId);var querySelect=viewerDiv.querySelectorAll('div.tsv_level.tsv_user');var _this=this;for(var i=0;i<querySelect.length;i++)
  193. {querySelect[i].addEventListener('mouseenter',function(target)
  194. {_this.onMouseEnter(target,regId);});}},onMouseEnter:function(mouseEvent,regId)
  195. {var div=mouseEvent.target;this.createHtml(div,regId);this.reposition(div,regId,mouseEvent);},reposition:function(div,regId,mouseEvent)
  196. {if(this.isChromium())
  197. {var viewerInner=TSV.ViewerScript.Helper.getInnerViewerDiv(regId);var toolTip=div.querySelector('.ts3v_user_tooltip');if(viewerInner.scrollTop>0)
  198. {toolTip.style.marginTop='-'+ viewerInner.scrollTop+'px';}
  199. else
  200. {toolTip.style.marginTop='0';}}},isChromium:function()
  201. {if(typeof this.isChromiumReturn=='undefined')
  202. {var isChromium=window.chrome,winNav=window.navigator,vendorName=winNav.vendor,isOpera=winNav.userAgent.indexOf("OPR")>-1,isIEedge=winNav.userAgent.indexOf("Edge")>-1,isIOSChrome=winNav.userAgent.match("CriOS");if(isIOSChrome){this.isChromiumReturn=true;}else if(isChromium!==null&&isChromium!==undefined&&vendorName==="Google Inc."&&isOpera==false&&isIEedge==false){this.isChromiumReturn=true;}else{this.isChromiumReturn=false;}}
  203. return this.isChromiumReturn;},createHtml:function(element,regId)
  204. {if(!element.classList.contains('ts3v_tooltip_created'))
  205. {element.classList.add('ts3v_tooltip_created');var tooltip=this.HtmlCreator.create(element,regId);element.querySelector('.tsv_content').appendChild(tooltip);}},HtmlCreator:{create:function(div,regId)
  206. {var tooltip=document.createElement('div');tooltip.classList.add('ts3v_user_tooltip');if(div.dataset.client_away==1)
  207. {var awayMessage=div.dataset.client_away_message;if(awayMessage=='')
  208. {awayMessage='-';}
  209. tooltip.appendChild(this.createDataDiv('Absent',awayMessage));}
  210. if(div.dataset.client_input_overall_muted==1)
  211. {tooltip.appendChild(this.createDataDiv('Micro','coupé'));}
  212. if(div.dataset.client_output_overall_muted==1)
  213. {tooltip.appendChild(this.createDataDiv('Son','coupé'));}
  214. var onlineTimeHuman=this.getHumanTimePassed(div.dataset.client_lastconnected,true,false);tooltip.appendChild(this.createDataDiv('En ligne',onlineTimeHuman));var idleTime=div.dataset.client_idle_time;if(idleTime>60000)
  215. {var idleHuman=this.getHumanTimePassed(idleTime,false,true);tooltip.appendChild(this.createDataDiv('AFK',idleHuman));}
  216. tooltip.appendChild(this.createDataDiv('Connu',this.getHumanTimePassed(div.dataset.client_created,true,false)));var serverIp=TSV.ViewerScript.Data[regId]['net_ip'];var udpPort=TSV.ViewerScript.Data[regId]['net_udp_port'];var channelId=div.dataset.cid;tooltip.appendChild(this.createBoxedLink('Se connecter au client',this.getConnectToUserLink(serverIp,udpPort,channelId),'Vous connecte au même canal que ce client'));var encodedUniqueIdentifier=encodeURIComponent(div.dataset.client_unique_identifier);tooltip.appendChild(this.createBoxedLink('Ajouter comme ami',this.getUserInfoLink(encodedUniqueIdentifier),''));tooltip.appendChild(this.createUserBanner(encodedUniqueIdentifier));return tooltip;},createDataDiv:function(labelName,data)
  217. {var div=document.createElement('div');var label=document.createElement('label');var dataSpan=document.createElement('span');label.textContent=labelName;dataSpan.textContent=data;div.appendChild(label);div.appendChild(dataSpan);return div;},getConnectToUserLink:function(ip,udpPort,channelId)
  218. {return'ts3server://'+ ip+'?port='+ udpPort+'&cid='+ channelId;},getUserInfoLink:function(uniqueIdentifier)
  219. {var a=document.createElement('a');a.href=TSV.ViewerScript.Loader.pageUrl+'index.php?page=userinfo&ident='+ uniqueIdentifier;return a;},createUserBanner:function(uniqueIdentifier)
  220. {var ub=document.createElement('img');ub.classList.add('tsv_userBanner');ub.src='https://userb.tsviewer.com/3_t-i/'+ uniqueIdentifier+'.png';var a=document.createElement('a');a.href=TSV.ViewerScript.Loader.pageUrl+'index.php?page=userbanners&ident='+ uniqueIdentifier;a.title='TS3 UserBanner';a.appendChild(ub);return a;},createBoxedLink:function(text,href,title)
  221. {var a=document.createElement('a');a.classList.add('boxedLink');a.href=href;a.textContent=text;a.title=title;return a;},getTimePassedlObject:function(intervalInSeconds)
  222. {var result={};var structure={day:86400,hour:3600,minute:60,second:1};Object.keys(structure).forEach(function(key)
  223. {result[key]=Math.floor(intervalInSeconds/structure[key]);intervalInSeconds-=result[key]*structure[key];});return result;},getHumanTimePassed:function(value,isSeconds,isDelta)
  224. {if(!isSeconds)
  225. {value=value/1000;}
  226. if(!isDelta)
  227. {value=(new Date().getTime()/ 1000) - value;
  228. }
  229. var interval=this.getTimePassedlObject(value);if(interval.day>0)
  230. {var hourString='';if(interval.day<3)
  231. {hourString=', '+ interval.hour+' h'}
  232. return interval.day+' j'+ hourString;}
  233. else if(interval.hour>0)
  234. {return interval.hour+' h, '+ interval.minute+' m';}
  235. else if(interval.minute>0)
  236. {return interval.minute+' min';}
  237. else
  238. {return interval.second+' sec';}}}},Data:{}};var ts3v_display=TSV.ViewerScript.Loader;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top