var sessionid = "7e0fac7476ad87b7d16f3cf30d798f01"; document.addEventListener("visibilitychange", onchangevisibility); function onchangevisibility (evt) { if(!socket.connected) { socket.disconnect(); socket.connect(); } } // Created by STRd6 // MIT License // jquery.paste_image_reader.js (function($) { var defaults = { callback: $.noop, matchType: /image.*/ }; $.fn.pasteImageReader = function(options) { // Sallitaan suora funktiokutsu: .pasteImageReader(function(data) {}) if (typeof options === "function") { options = { callback: options }; } options = $.extend({}, defaults, options); return this.each(function() { var element = this; var $this = $(this); $this.on('paste', function(event) { // Noudetaan leikepöytädata jQueryn originalEventin kautta var orgEvent = event.originalEvent; var clipboardData = orgEvent ? orgEvent.clipboardData : window.clipboardData; if (!clipboardData || !clipboardData.items) { return; } var items = clipboardData.items; for (var i = 0; i < items.length; i++) { var item = items[i]; if (item.type.match(options.matchType)) { var file = item.getAsFile(); if (!file) continue; var reader = new FileReader(); reader.onload = function(evt) { options.callback.call(element, { dataURL: evt.target.result, event: evt, file: file, name: file.name || "pasted-image" }); }; reader.readAsDataURL(file); event.preventDefault(); // Estää raakadatan liittämisen kenttään break; } } }); }); }; })(jQuery); var points = {}; var is_vip; var tps = ["pt","tp","nm","m","p","mn","tp?","pt?","nm?","moi tp"]; var tpsblack = "spons"; var blacklistwords = "mannersllrl"; var msgcounter = 0; var othermsgcounter = 0; function markuptext(text,identifier,htmltag) { var array = text.split(identifier); var previous = ""; var previous_i; for (i = 0; i < array.length; i++) { if (i % 2) { array[i] = identifier + array[i]; } else if (i!=0) { previous_i = eval(i-1); array[previous_i] = "<"+htmltag+">"+(previous.replace(identifier,''))+""; } previous = array[i]; } var newtext = ""; for (i = 0; i < array.length; i++) { newtext += array[i]; } return newtext; } if(localStorage.guestsession == undefined || localStorage.guestsession == "") { localStorage.guestsession = getCookie("guestsession"); }else { var myDate = new Date(); myDate.setMonth(myDate.getMonth() + 12); document.cookie = "guestsession=" + localStorage.guestsession + ";expires=" + myDate + ";domain=.nu.deittihuone.fi;path=/"; } function isIEorEDGE(){ if (navigator.appName == 'Microsoft Internet Explorer'){ return true; // IE } else if(navigator.appName == "Netscape"){ return navigator.appVersion.indexOf('Edge') > -1; // EDGE } return false; } (function (window) { var on, off; function Webkit() { if (window.webkitRequestFileSystem) { window.webkitRequestFileSystem(window.TEMPORARY, 1, off, on); return true; } } function Mozilla() { if ('MozAppearance' in document.documentElement.style) { const db = indexedDB.open('test'); db.onerror = on; db.onsuccess = off; return true; } } function Safari() { if (/constructor/i.test(window.HTMLElement)) { // iOS 11 // Origin: https://gist.github.com/cou929/7973956#gistcomment-2272103 try { window.openDatabase(null, null, null, null); } catch (e) { on(); } // Older Safari try { if (localStorage.length) off(); else { localStorage.x = 1; localStorage.removeItem('x'); off(); } } catch (e) { // Original gist: https://gist.github.com/jherax/a81c8c132d09cc354a0e2cb911841ff1 // Safari only enables cookie in private mode // if cookie is disabled then all client side storage is disabled // if all client side storage is disabled, then there is no point // in using private mode navigator.cookieEnabled ? on() : off(); } return true; } } function IE10Edge() { if (!window.indexedDB && (window.PointerEvent || window.MSPointerEvent)) { on(); return true; } } window.isPrivate = function (on_cb, off_cb) { on = on_cb || function () {}; off = off_cb || function () {}; Webkit() || Mozilla() || Safari() || IE10Edge() || off(); }; })(window); //var tenor = new Tenor('AIzaSyDt8cf-R-wpYcltghSIC8wlSspO5GATsew',{}); var tenor = new Tenor('7M2ooRP8OZeLmrv0E5OYRNXBN54gsOxoH0V8Q62Eg7z96LtzpO2jWwTM72pumOUd',{}); function giphyclick(that,timeout) { if(timeout != 1 || $(that).attr("data-running") == "1") { $(that).find(".giphyimg").toggle(); $(that).find("video").toggle(); $(that).find(".gifplay").toggle(); if($(that).attr("data-running") == "1") { $(that).attr("data-running","0"); $(that).find("video")[0].pause(); } else { $(that).attr("data-running","1"); $(that).find("video")[0].play(); } setTimeout(function() { giphyclick(that,1); },30000); } } function iOS() { var iDevices = [ 'iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod' ]; if (!!navigator.platform) { while (iDevices.length) { if (navigator.platform === iDevices.pop()){ return true; } } } return false; } if(iOS()) { document.addEventListener('touchmove', function (event) { if (event.scale !== 1) { event.preventDefault(); } }, false); var lastTouchEnd = 0; document.addEventListener('touchend', function (event) { var now = (new Date()).getTime(); if (now - lastTouchEnd <= 300) { event.preventDefault(); } lastTouchEnd = now; }, false); $(".messageinput").css("font-size","16px"); } var currentcam = 0; var videoDevices = []; function changecamera() { webrtc.stopLocalVideo(); webrtc.leaveRoom(); $("#localVideo").html(""); webrtc.webrtc.localStreams = new Array(); videoDevices = []; navigator.mediaDevices.enumerateDevices().then(function (devices) { for (var i = 0; i !== devices.length; ++i) { var device = devices[i]; if (device.kind === 'videoinput') { device.label = device.label || 'camera ' + (videoDevices.length + 1); videoDevices.push(device); } } //default media options var mediaOptions = { audio: true, video: true }; if(videoDevices.length <= (currentcam+1)) currentcam = -1; currentcam++; webrtc.config.media.video.deviceId = videoDevices[currentcam].deviceId; webrtc.startLocalVideo(); setTimeout(function() { webrtc.joinRoom(roomid[0]); },1000); }); } setTimeout(function() { $('.chat-window[data-id="0"] .chatdata').html('

Estetty

VPN-yhteydet estetty spämmin vuoksi.
Ota VPN-yhteys pois käytöstä päästäksesi chattiin.

'); },1000);