Dissonant

Dissonant web chat, for every page on the internet

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name Dissonant
// @description Dissonant web chat, for every page on the internet
// @namespace Fusir Projects
// @match *://*/*
// @exclude *://js.lifelist.pw/*
// @exclude *://*/*.jpg
// @exclude *://*/*.png
// @exclude *://*/*.gif
// @exclude *://*/*.jpeg
// @noframes
// @grant none
// @version 0.0.1.20190314133531
// ==/UserScript==

// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
function expanddiv() {
  var div = $('<div>');
}

function expandinsertdiv() {
  //Finds the best place to add the chat expand button
}

function pageidentifier() {
 return location.host.replace('www.','')+location.pathname;
}

function openchat () {
  var chat = document.createElement('iframe');
  chat.src = 'https://js.lifelist.pw/app/wchat/dissonant/'+pageidentifier();
  chat.style.width = '98vw';
  chat.style.height = '65vh';
  var body = document.getElementsByTagName('body')[0];
  body.parentNode.appendChild(chat);
  window.addEventListener('blur',()=>{chat.blur()});
  window.addEventListener('blur',()=>{chat.focus()});
  chat.focus();
  //$('body').first().after($('<iframe>').attr('src','https://js.lifelist.pw/app/wchat/dissonant/'+pageidentifier()).css('width','98vw').css('height','50vh'));
}

openchat();