1Vue.filter('secondstotime', function(secs){ 2 var t = new Date(1970,0,1); 3 t.setSeconds(secs); 4 var s = t.toTimeString().substr(0,8); 5 if(secs > 86399) 6 s = Math.floor((t - Date.parse("1/1/70")) / 3600000) + s.substr(2); 7 return s; 8 9}) 10 11Vue.filter('capFirst', function(string){ 12 return string.charAt(0).toUpperCase() + string.slice(1); 13}) 14 15Vue.directive('tooltipster', { 16 bind: function (el, binding, vnode) { 17 var option = {} 18 if (typeof binding.value !== 'undefined'){ 19 option = binding.value 20 } 21 $(el).tooltipster(option) 22 } 23}) 24 25function getOperatingSystem(){ 26 var Name = undefined; 27 if (navigator.userAgent.indexOf("Win") != -1) Name = "windows"; 28 if (navigator.userAgent.indexOf("Mac") != -1) Name = "mac"; 29 if (navigator.userAgent.indexOf("Linux") != -1) Name = "linux"; 30 if (navigator.userAgent.indexOf("Android") != -1) Name = "android"; 31 if (navigator.userAgent.indexOf("like Mac") != -1) Name = "ios"; 32 return Name; 33} 34 35Array.prototype.selectOne = function() { 36 var index = Math.floor(Math.random()*this.length) 37 return this[index]; 38 }; 39 40// https://stackoverflow.com/a/6274381/5885054 41Array.prototype.shuffle = function() { 42 var j, x, i; 43 for (i = this.length - 1; i > 0; i--) { 44 j = Math.floor(Math.random() * (i + 1)); 45 x = this[i]; 46 this[i] = this[j]; 47 this[j] = x; 48 } 49}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.