// ==UserScript==
// @name Kekekeᴾˡᵘˢ
// @namespace https://greasyfork.org
// @version 1.9.4
// @description 在kekeke加入黑名單、關鍵字遮蔽、上傳imgur圖床、儲存對話紀錄、顯示色碼、圖片工具、強化通知、自訂顏色版面...等輔助工具
// @author Pixmi
// @icon http://www.google.com/s2/favicons?domain=https://kekeke.cc/
// @include https://kekeke.cc/*
// @include https://www.kekeke.cc/*
// @license MIT
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
/* jshint esversion: 6 */
$(window).on('load', function () {
'use strict';
var config,
blockArray,
defaultTitle;
// 檢查Local Storage的kekeke_plug_config是否存在
if (localStorage.getItem('kekeke_plug_config') === null) {
// 對config做初次設定
config = {
version: '1.9.4',
matchName: true,
matchColor: true,
replace: true,
keyword: false,
Block_Word: '點讚,訂閱',
Block_Emoji: '',
tabTip: false,
seeColor: false,
Custom_Style: false,
Body_Color: '#444444',
Link_Color: '#FFAA00',
Font_Color: '#eeeeee',
Chat_Color: '0.5',
Auto_Logs: false,
Logs_Time: true,
Download_Time: '0',
Beep: false,
Beep_volume: '1',
imgur: true,
imgur_API: 'API'
};
} else {
// 舊版本升級新版本時,預防Local Storage出錯的檢查與設定
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
if (config.version != '1.9.4') { config.version = '1.9.4'; }
if (typeof config.keyword === 'undefined') { config.keyword = false; }
if (typeof config.Block_Word === 'undefined' || typeof config.Block_Word !== 'string') { config.Block_Word = '點讚,訂閱'; } // 修正1.7.0版本config.Block_Word設定成陣列造成的錯誤
if (typeof config.Block_Emoji === 'undefined') { config.Block_Emoji = ''; }
if (typeof config.Body_Color === 'undefined') { config.Body_Color = '#444444'; }
if (typeof config.Link_Color === 'undefined') { config.Link_Color = '#FFAA00'; }
if (typeof config.Font_Color === 'undefined') { config.Font_Color = '#EEEEEE'; }
if (typeof config.Chat_Color === 'undefined') { config.Chat_Color = '0.5'; }
if (typeof config.Auto_Logs === 'undefined') { config.Auto_Logs = false; }
if (typeof config.Logs_Time === 'undefined') { config.Logs_Time = true; }
if (typeof config.Logs_Clear != 'undefined') { delete config['Logs_Clear']; }
if (typeof config.Download_Time === 'undefined' || config.Download_Time == '0') { config.Download_Time = '1'; }
if (typeof config.Beep === 'undefined') { config.Beep = false; }
if (typeof config.Beep_volume === 'undefined') { config.Beep_volume = '1'; }
if (typeof config.imgur === 'undefined') { config.imgur = true; }
if (typeof config.imgur_API === 'undefined' || config.imgur_API == 'API') { config.imgur_API = ''; }
}
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
// 1.8.0版本起,不在使用kekeke_logs
if (localStorage.getItem('kekeke_logs') !== null) { localStorage.removeItem('kekeke_logs'); }
setTimeout(function () {
// 給部分物件加上ID
$('table.SquareCssResource-chatRoom > tbody > tr:last').find('table').attr('id', 'ChatTable');
$('div.gwt-MenuBar.gwt-MenuBar-horizontal.GlobalCssResource-statusPanel').attr('id', 'MenuBar');
// 替換原有功能的Icon
$('.SquareCssResource-inputAreaTool td:eq(0)').find('img').attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAepSURBVFhH3VhLTJtXFo46VWcxmk2ldjWzGWmkSrNt1cdiFiO1M7tZTRdddFVpGsAPDDQ0j9Kkz8j49wuwMfb/so1jY2NsajDYGBPCG/JCkwSStGleTdNQdZRJGgr49JzLxQH617EhXUw/6cjnv/+955z/nnvOPcd7flVorpGeE3RySKiW3m5qanqCD5eN5mrxVZtRTQhV4j/50OMDGWSr9V/xfBBfsRqU7y010qj5bfVZ/rokmpoiTzlMqmrRSQXJnAJc+6B5r/hH/vrxwKYXX8XdK0ydugnjs9fBdSh6F58X7TrfM3yKJiL/ivxG0Et9jvrgSj5/CU5eWIK2A5HvLNXS+3zK44FzX2dAbu5jCoimz9wC96Gu+4JBHuRTNNFc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UTBR+zEJ/9KkeEbAVseKiQZuwqNBlQwuGrfXBWd/abIS6RUz/YvG1f+/YM+eHwGROK8V3A41AgAAAABJRU5ErkJggg==');
$('.SquareCssResource-inputAreaTool td:eq(1)').find('img').attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAjfSURBVFhHzVjnb1xZFQ9VgBD8B/AVEEhICCQE4hMSEis+0IQQH/gARIo9ntjZNO+GdXaz2fXG4yku8ZQ3r0x1t8d14hKXseO4dydx77HjlrUTl7H9fpx7/Zw43gmbMkEc6Scdzdx3zu+ee8+5594TLyspcc4fGONkQ9oZecwUJ+2k6iQY9XLYkiAvmxPkYoPO+VfbSdtXtOH/GzHrle8YYsVrJr3cTIRU63lFLUx2o8LkQU26B9UWL8oMHvguu2COl1VLvLJE43+jff5mxaCXf0LEtqznFDX7iosIedGp+J+LNtGHvI/cYBMxxDhPaWbejCQl5X6VIjLuSXKjQ45M6HmopOgykik66S3NXPSFIvBLIzlpdUYm8XnI/8gDs15eoz35Dc1kdCU1Vky0X3SFDx3WXfci65wC5d8K14+SiYR2yY/0M/JeaqwUr5mMrhDBj5X33DuHzrLOKijMCCDfXAxjnATbeYWi5MYNsxcNWV40230c7dp2aLR6IVxU9ilhWjWT0RWaudF12bvNnN2w+GFN9GDj/jDCa+NYGh1EqOAmXFdzkBavsP32BCXpBZhurkfmWWXXGCfuGHTS46SkpC9rZqMnFMELzkve9ZnWEB4v3MOjxRFOLhLW54exPD6E5bFBbC2P8d/EyzmrBp2YlPR36WuayegKLc0/rYne5eNkXhSN+bW7FNGQZi66wgotGV8S3vO/MsE7TW205KKafs5dSUv8Rc10dMSol5rzzMWrYx1dEZ2/CB4tjKAjGKKEkvdTYuRfaaajI0a9MsqMR3L8skg/69qkhPujZjo6QplXXC5UbEZy+DJ4OHMXlChqil74oWY6O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SsHT3umB0CNfAstqyHnsHtcy4CZzH1wQhZIGgWnzkvybJ7eQtQSAcKKLQgcLyr7ylY6+3AXL1L4QZJ5jDLYZLlQAhgdnUTBlcvXn9oq1hoteL4vS43VOgfguqihWZukozPrW0CbgQBXHwWsf91dLv23wfxNUuRwn1PbjyDkokYJYIItRIcN9mmKaCa9MDIOGqRZHHau/W3kCigiGmJeqVyx/71B5VczNTIxIxfllG2Jj2pXpOeYNYRJB4OsxUBNFX1RVdxItUY/gbV+Vv0GBlDQFkaE6A+RDIJsy4TsdMJIWWpmo/RVHqpBKQK1aZySihIPBzOt+LMW/DX0ALcbX4Mldvah5Dwbaap0U6PkTEKmFm25SVXAUISv595pNiIAMpydwJGHhq/WiPjexGTLCAGKbFJlsbuKDGnqAsxMmtAmWNZQ6mlVj8nrwvvXdZw/nGdf3uJ5RL2xSXGyMrKek0qVn9HJu8FcnHuyxRmbk//dfg/EsaRI/8AEKvXDtF0iBIAAAAASUVORK5CYII=');
$('.SquareCssResource-inputAreaTool td:eq(5)').find('img').attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAZESURBVFhH3VhZTFxVGMYlMa7xQU1cYow+mPjokvhg9MH45qO+GI0aTW2ZDQqm0ppgq7XLLHf2mTv33HNnCi0F2wqlQaB0UbaWlpa9VJbSUgoFalvaAgPM/f3PnUOZYUicmYIYv+TLwNw7///d//zLOTcjXVgy5XccJnnSuZ42CCbyKv/6vwOLjuaKG6labJZVm5HOWfR0I2TAffzy6gMFfiAYqTo3IkFrpQzObKo6spXKHd+Sx/ktqwt3pvsxq57C5ZMegFEJxjoJiHlUtWfTLsGkPMlvW11g1G52VrphZsAJ6kgAbvVLEPyBqq5s2u4wFDzBb1s9+DbIA037vBDuE2CflUBtEYGJPgn832EkDbSM37Z6EPPknoa9Pk1g33EX2I0Uh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0Uu42Nbhz5MoKD4kaQ9YECNRIEtxoTy+qQ41OKBMItJWKmr3brT5wracqFuTn3GVqMGcqn3lzlcjEWf7EnNM9Dug96oaJruSEss3spXonTHW74+wwoYKeRsxrdz3DXaYGa3bxw/iE1+sLpDjDzfvRMDbeyxiRpQQtJjs3s/3ipWPRyDHebvMB2UQBOwXh7tKDVSd/6cRluNbkv2u8cbcE7WWiFskxnNPHQgtnkjvno1FlaVDuCmhb/+lzTqgNBaCnakFgQ2EAxx+eDnEgcFfpoeTjkgfc65Xmwi0yLF5qxmoxAEXbiCZq6ITz7s56AseaE88kHeULoubZd1hks1lFruVu7g1sR+3MlsdLMcFvtcQ7Y8vfU4WRworsP+rTln6qy4PXvNBUJMGFmniBA0dE8ORSFVOnmJtfHpgN8msOFMkiOXoiXuQ8WVX2VidGbJ4sLexZVMXIljoMjoe46eVDNJL0DDsLs8jdPLO0kMUcrvPDPrO2o1btWcGdK/oWljVwPJl9xd4LenNp5DcvgY6DIlxrikaQCWK5OnhchOZfArD3Z5m9gWD9rsumI29yMysP9vKIVbgrVz4iGOgsG4uMbAnxUK79LZjoFLaRAkum8j4+2P38p/8+WD7Z1skvs7f+mKsfWQ3ye2yW88v/d2Rk/A3zhCPxJxMb3gAAAABJRU5ErkJggg==');
$('.SquareCssResource-inputAreaTool td:eq(6)').find('img').attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAcOSURBVFhH5ZhZTBtXFIZTVV2lqlWr7lLVp75EVZ9aqar61Je+9LFSK1VqpapstiFgGxtsAyFOjO2xE7LTgO+MbcCAWZKQFUQgCyQhgSSENglJlK1ZWVIoJITA6TnjazDONQlNs6g90i/Pnbkz55t7z5xzrxf8b8ybJi/0aFhI0jKfJ1l+n59+OsyjZT9LGt+YI99/1WGVx6V036AnjX3NLz85c2pK3/NofI2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oadevW/wE5XGnuHX346zJO54XVMPw6XQbFRieSn/+u2YMHf5p6dDDJU1xkAAAAASUVORK5CYII=');
// 增加清除好料的按鈕
$('<span id="clearMedia">清除好料</span>').css({ 'cursor': 'pointer', 'margin-left': '5px', 'padding': '0 3px' }).addClass('SquareCssResource-eventSectionModeSelector').insertBefore($('.SquareCssResource-mediaFlow .SquareCssResource-eventSectionModeSelector'));
$('.SquareCssResource-eventSectionModeSelector').css({ 'border-width': '1px', 'border-style': 'solid', 'line-height': '20px', 'box-sizing': 'content-box', 'display': 'block', 'height': '20px' });
// 增加黑名單操作的按鈕
$('<td class="gwt-MenuItem" id="Album_Mode" role="menuitem" title="以相簿形式觀賞及時好料">相簿模式</td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('<td class="gwt-MenuItemSeparator"><div class="menuSeparatorInner"></div></td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('<td class="gwt-MenuItem" id="viewBlockUser" role="menuitem" title="檢視在黑名單中的使用者,點擊使用者名稱即可對其解除封鎖。">檢視名單</td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('<td class="gwt-MenuItemSeparator"><div class="menuSeparatorInner"></div></td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('<td class="gwt-MenuItem" id="addBlockUser" role="menuitem" title="檢視目前有發言的使用者,直接點擊可封鎖該位使用者。">黑名單</td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('<td class="gwt-MenuItemSeparator"><div class="menuSeparatorInner"></div></td>').insertAfter('.gwt-MenuItem:contains("Q & A")');
$('.gwt-MenuItem').hover(function () {
$(this).addClass("gwt-MenuItem-selected");
}, function () {
$(this).removeClass("gwt-MenuItem-selected");
});
// 增加進階設定的按鈕
$('<td><div><img id="KekekeConfig" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAA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Y53KVdiapjXOOgKCUzfKqbeqc8Y0sVTTGfnzcralgd1yKtaMMXV7YFjNpsvvPo5XCqnqbOaRXHCjQgHU2hBun+ZDE1+vcRPi0cPv/dcKriPoePpo+l+5MFx07XzcFvZuUPaOGwJh3cCWPbGx9e5vf59ukoONQ5HE2RrdaWAXFk1Y5DkTzWq5Ev2WdCuj9ZtAd3QAJuPrNFij6OWyvuhIcWuHfzo9kMdEy8dObcbaO8g3he4OCOwz4O/Tj8q6dFwMEHJ2O24isQcfXBkDxTubCXD0dcgK3NfQeW1shPpUmV9fLAq9hZZjI7ZXC4DsG1CK5HpLm4+uDdYgvXKH5Hms8kUQEHX9KkMsF/xU7SfG7Yc96IXCnNNHF5VH10EcaF0ssujzouBhqM55XHvD8n/+XLo9MKrthCntkyQFzJmRoDWWl2doJLSnQgpYDojCyX+gek2dmJuALmTgT9pHoFjOtgtG//FVfAEFyYozSxFi7R77zmOieH/5elquofGTevJy9qMAkAAAAASUVORK5CYII=" style="cursor: pointer;" title="開啟Kekekeᴾˡᵘˢ設定選項"></div></td>').insertBefore($('.SquareCssResource-submitInputButton'));
// 增加紀錄設定的按鈕
$('<td><div><img id="KekekeLogs" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVlSURBVHhe7VpbbxtFFDYgeEA88YIQzzzBT+GVF8QzSPWFRmpBRYClJlxKfWkhKHFivI4dK8FpbkVtqUBJ1FZpaBq7SWhDkya0SdwER0kaGiSKlA5z1nPW4/XY3rV3bW/YI31KduacOef7ZjI7u1mHbbbZZptttjkcXm/yBZ8z8rXfJWUoiEWR8bmkr4ALo6Xd/M7Il4IBrQnKhdHSbnT2H0LwxUt3yJWZjYZhaj5LUne3FcB1JR/E2NgSipBhtLQbqqdOVk/UQv7mwja5lt5UVgGjpd0aLYAR5MHHMgJcTW2Q3+7tyL8b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QNwT3hcZLomyQdbfkBA27pV//70deYa0XDOFGRZgLzsjK0m8/5/VsY/M0JttwpAp6eg8DR+Keh90LPM1dNhueOP64nhYWaAcjF6q7iQ0qnNI+kAcGWnqedrcNjlPyrzEWX6Tl3iPDD6Th5sqoiSa/7T8WF/gWo5lNaurOP0z0gG/wg2nemJf4unfEXWVdVpvfcIcLK5ECBANm5igewDOSs6mPqZjK6FwWB0IVQokCAB1OKAFPM9XAa3Gl8LulfvzvydGUyv4c8TOUEoALdYa6H1+C/vEC286PoQXY+d7/fXx6kmzIIID2udBCzvMl7CN2XQITvjkXJ3YncSoi19sir4LQn/CZzPbzWfqT9Jbox/wyEAfG2mCIA3exOMLfDbcm3k89RwsfpuWIPhQDQP4Ml5vL/MH9L98uUuAcexCh26MqYYF222WabbbaJzeH4D6uBiP3McYkFAAAAAElFTkSuQmCC" style="cursor: pointer;" title="開啟Kekeke Logs設定選項"></div></td>').insertBefore($('.SquareCssResource-submitInputButton'));
// 圖片上傳的按鈕
if (config.imgur) {
$('<td><label id="imgur_label" for="imgur_upload" class="gwt-Button">上傳Imgur</label><input type="file" id="imgur_upload" accept="image/x-png,image/gif,image/jpeg" data-max-size="5000"/></td>').insertAfter($('.SquareCssResource-submitInputButton'));
$('#imgur_upload').css({'position':'absolute','width':'1px','height':'1px','padding':'0','margin':'-1px','overflow':'hidden','clip':'rect(0,0,0,0)','border':'0'});
$('#imgur_label').css({'display':'inline-block','color':'#000','margin-left':'4px'});
}
$('.SquareCssResource-chatRoom .SquareCssResource-inputArea td > div').css('padding', '0 1px');
// 自訂樣式的<style>
$('head').append($('<style></style>').attr('id', 'Custom_Style'));
$('body').append($('<div></div>').addClass('slide'));
// 自訂色系
if (config.Custom_Style) CustomStyle(config);
Observer();
}, 1500);
const observeConfig = {
attributes: true,
childList: true,
characterData: true,
subtree: true
};
const url = /<a class="GlobalCssResource-external" target="_blank" ref="noopener" href="((http|https)(:\/\/)[\w\+\-\*\/\.\&\:\(\)\<\>\?\=]*)">((http|https)(:\/\/)[\w\+\-\*\/\.\&\:\(\)\<\>\?\=]*)<\/a>/ig;
const emoji = /<img class="GlobalCssResource-smiley" src="\/com\.liquable\.hiroba\/emoji\/[\w]*\/[\w\+\-\*\/\^\.\&\:\(\)\<\>]*.[a-z]*" alt="([\w\+\-\*\/\^\.\&\:\(\)\<\>\@]*)">/ig;
const br = /<br>/ig;
const image_url = /((http|https):\/\/[\w\+\-\*\/\.\&\:\(\)\<\>\?\=]*\.(jpeg|jpg|gif|png|webp))/i;
var audioElement = document.createElement('audio');
audioElement.setAttribute('src', 'data:audio/mpeg;base64,SUQzAwAAAAAfdlRJVDIAAAAsAAAAWWlzZWxsLmNvbSAtIMzhuam6o8G/0vTQp8XkwNbL0cv3z8LU2Lf+zvGjoVRQRTEAAAAmAAAA0vTQps34IC0g0vTQp7/sy9nL0cv3o6zF5MDWv+zL2bfWz+2joVRBTEIAAAAwAAAA0vTQps34IC0gyta7+rXnxNTL5sTjt8POyqOsv+zL2cfQu7ujrL/sy9nK1cz9o6FUWUVSAAAABQAAADIwMThDT01NAAAAGAAAAGVuZwDS9NCmzfggLSBZaXNlbGwuY29tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqVEFHWWlzZWxsLmNvbSAtIMzhuam6o8G/0vTQp8XkwNbL0vTQps34IC0g0vTQp7/sy9nL0cv3o6zF5MDWv+zL0vTQps34IC0gyta7+rXnxNTL5sTjt8POyqOsv+zLMjAxONL00KbN+CAtIFlpc2VsbC5jb20AAAAAAAAAAAAAAP8=');
audioElement.volume = config.Beep_volume;
function Observer() {
// 建立rootObserver監控
let rootObserver = new MutationObserver(function (mutations) {
// 設定要監控的元素
let chatElement = document.body.querySelector('table#ChatTable'),
mediaElement = document.body.querySelector('table.SquareCssResource-mediaFlow'),
voteElement = document.body.querySelector('table.SquareCssResource-lightningVote'),
slideElement = document.body.querySelector('div.slide'),
titleElement = document.head.querySelector('title');
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
// 確認chatElement、voteElement都已經生成
if (chatElement && voteElement) {
// 結束rootObserver監控
rootObserver.disconnect();
defaultTitle = $('.gwt-HTML.SquareCssResource-squareHeaderAddress').text().replace("kekeke.cc/", "");
console.log(`Kekekeᴾˡᵘˢ ${config.version} 已在${document.title}啟動。`);
// 檢查是否為主播版
const anchor = $('div.SquareCssResource-anchorBar').length !== 0 ? true : false;
// 清空kekeke_logs紀錄
localStorage.setItem(`logs_${defaultTitle}`, JSON.stringify([]));
// 執行遮蔽黑名單
function Blocked(target) {
chatObserver.disconnect();
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
blockArray = JSON.parse(localStorage.getItem("blacklist"));
$(blockArray).each(function () {
let blocklistName = this.name,
blocklistColor = this.color,
Post_Content = target.parents('.SquareCssResource-chatContent').find('.SquareCssResource-message'),
Message;
// 依照使用者儲存的判斷模式做篩選
if (config.matchName && config.matchColor) {
if ($(target).text() == blocklistName && $(target).css('color') == blocklistColor) { actionBlock($(target)); }
} else if (config.matchName && !config.matchColor) {
if ($(target).text() == blocklistName) { actionBlock($(target)); }
} else if (!config.matchName && config.matchColor) {
if ($(target).css('color') == blocklistColor) { actionBlock($(target)); }
}
// 檢查聊天文字內容是否有@黑名單的人
if (config.replace) {
if (Post_Content.html().indexOf('@' + blocklistName + ' ') >= 0) {
Message = Post_Content.html().replace('@' + blocklistName + ' ', '');
}
if (Post_Content.html().indexOf('@' + blocklistName + '<') >= 1) {
Message = Post_Content.html().replace('@' + blocklistName + '<', '<');
}
$(Post_Content).html(Message);
}
});
chatObserver.observe(chatElement, observeConfig);
}
// 建立titleObserver監控發文通知
var titleObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
// 判斷title產生變化,是否與預設title不同
if (mutation.addedNodes[0].textContent !== defaultTitle) {
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
blockArray = JSON.parse(localStorage.getItem("blacklist"));
if (!config.tabTip) {
// 將title替換為預設title
$(document).attr('title', defaultTitle);
} else {
let Post_Name = $('#ChatTable tr:first').find('.GlobalCssResource-colorNickname');
$(blockArray).each(function () {
if (config.matchName && config.matchColor) {
if ($(Post_Name).text() == this.name && $(Post_Name).css('color') == this.color) { $(document).attr('title', defaultTitle); }
} else if (config.matchName && !config.matchColor) {
if ($(Post_Name).text() == this.name) { $(document).attr('title', defaultTitle); }
} else if (!config.matchName && config.matchColor) {
if ($(Post_Name).css('color') == this.color) { $(document).attr('title', defaultTitle); }
}
});
}
}
});
});
titleObserver.observe(titleElement, observeConfig);
// 建立chatObserver監控聊天頻道
var chatObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
// 有新的發言近來
if (mutation.type == 'childList' && mutation.addedNodes.length >= 1 && mutation.addedNodes[0].nodeName === 'DIV') {
// 被@時加入提示音效(設定有開啟的話)
if (mutation.addedNodes[0].classList.contains('SquareCssResource-replyToMe') && config.Beep) {
let Post_Name = $(mutation.addedNodes[0]).find('.GlobalCssResource-colorNickname');
let beep = true;
blockArray = JSON.parse(localStorage.getItem("blacklist"));
$(blockArray).each(function () {
if ($(Post_Name).text() == this.name && $(Post_Name).css('color') == this.color) {
beep = false;
}
});
if (beep) audioElement.play();
}
if (mutation.addedNodes[0].classList.contains('SquareCssResource-chatContent')) {
// console.log($(mutation.addedNodes));
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
let Post_Name = $(mutation.addedNodes[0]).find('.GlobalCssResource-colorNickname');
let Post_Content = $(mutation.addedNodes[0]).find('.SquareCssResource-message');
// 將聊天紀錄輸出到console.log
if (config.Auto_Logs) {
let logs = JSON.parse(localStorage.getItem(`logs_${defaultTitle}`)),
// 設置去除表情符號html與超連結html的regex
text = Post_Content.html().split('<span class="SquareCssResource-chatDate">'),
// 替換掉html,保留表情符號的alt與超連結的href
logs_content = text[0].replace(url, '$1').replace(emoji, '$1').replace(br, ''),
// 設定時間戳記
time = getDateTimes(config.Logs_Time, 'logs');
// 略過空白的對話內容
if (logs_content !== '')
logs.push(time + Post_Name.text() + ' : ' + logs_content);
localStorage.setItem(`logs_${defaultTitle}`, JSON.stringify(logs));
}
// 主播版的圖片轉換
if (anchor) {
anchor_image(Post_Name, Post_Content, false);
}
if (config.seeColor) {
let rgb = Post_Name.css('color'),
userColor = $('<span>' + rgb2hex(rgb) + '</span>').css({ "color": rgb2hex(rgb), "font-weight": "normal", "padding-left": "5px" }).addClass('userColor');
Post_Name.after(userColor);
}
Blocked($(Post_Name));
if (config.keyword) {
RemoveKeyword(Post_Name.text(), Post_Content);
}
RemoveEmoji(Post_Content);
}
}
});
});
chatObserver.observe(chatElement, observeConfig);
// 建立mediaObserver監控即時好料
var mediaObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.type == 'childList' && mutation.addedNodes.length >= 1 && mutation.addedNodes[0].localName == 'tr') {
var media = mutation.addedNodes[0];
// console.log(media);
setTimeout(function () {
mediaBoost($(media).find('.SquareCssResource-mediaContent'));
}, 1500);
}
});
});
mediaObserver.observe(mediaElement, observeConfig);
// 建立voteObserver監控投票
var voteObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
// 有新的投票出現
if (mutation.type == 'childList' && mutation.addedNodes.length >= 1) {
if (mutation.addedNodes[0].childNodes.length >= 4) {
let initiator = $(mutation.addedNodes[0].childNodes[2]),
name = $(initiator).text(),
color = $(initiator).css('color'),
vote = $('.SquareCssResource-voteChartPanel').find('.gwt-Button');
if ($(vote).length > 0) {
console.log(`發現新投票,發起人為 ${name} 辨識色碼為 ${color}`);
$(vote).attr('id', 'vote_button');
if (checkUser(initiator)) {
document.getElementById("vote_button").click();
setTimeout(function () {
$('body').find('.gwt-DialogBox').find('.dialogMiddleCenter').find('tr:last-child').find('.gwt-Button').attr('id', 'yes_button');
$('body').find('.gwt-DialogBox').find('.dialogMiddleCenter').find('tr:first-child').find('input[type="radio"]').attr('checked', true);
document.getElementById("yes_button").click();
}, 2000);
}
}
// 依黑名單與規則隱藏投票視窗
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
var blockArray = JSON.parse(localStorage.getItem("blacklist"));
$(blockArray).each(function () {
if (config.matchName && config.matchColor) {
if ($(initiator).text() == this.name && $(initiator).css('color') == this.color) {
$('.SquareCssResource-voteChartPanel').css('display', 'none');
console.log(`發現由 ${this.name} 發起的新投票,已進行遮蔽`);
} else {
$('.SquareCssResource-voteChartPanel').css('display', 'table');
}
} else if (config.matchName && !config.matchColor) {
if ($(initiator).text() == this.name) {
$('.SquareCssResource-voteChartPanel').css('display', 'none');
console.log(`發現由 ${this.name} 發起的新投票,已進行遮蔽`);
} else {
$('.SquareCssResource-voteChartPanel').css('display', 'table');
}
} else if (!config.matchName && config.matchColor) {
if ($(initiator).css('color') == this.color) {
$('.SquareCssResource-voteChartPanel').css('display', 'none');
console.log(`發現由 ${this.name} 發起的新投票,已進行遮蔽`);
} else {
$('.SquareCssResource-voteChartPanel').css('display', 'table');
}
}
});
}
}
});
});
voteObserver.observe(voteElement, observeConfig);
var oldWidth = $('#popup').width();
// 建立slideObserver監控滑動視窗
var slideObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.target.id === 'popup' && mutation.attributeName === 'style' && oldWidth !== $('#popup').width()) {
$('#popup').height(function () {
var newHeight = $('#popup').width() / $('#popup').attr('data-ratio');
// console.log(newHeight);
return newHeight;
});
if ($('#popupRotate').css('transform') !== 'matrix(1, 0, 0, 1, 0, 0)') {
$('#popupRotate').css('transform', 'rotate(0deg)');
$('#popupImg').css('top', '0');
}
oldWidth = $('#popup').width();
}
});
});
slideObserver.observe(slideElement, observeConfig);
// 檢查自動下載
if (config.Auto_Logs) {
let s = config.Download_Time * 60 * 60 * 1000;
if (s < 5000 || s === null) { s = 60 * 60 * 1000; } // 避免local storage發生問題時(例如NaN、0值)造成瀏覽器崩潰
console.log(`已開啟自動下載,每 ${config.Download_Time} 小時自動下載對話紀錄`);
var Download_Logs = setInterval(function () {
console.save(JSON.parse(localStorage.getItem(`logs_${defaultTitle}`)), document.title + '.' + getDateTimes(true, 'files') + '.log');
// 清空紀錄
localStorage.setItem(`logs_${defaultTitle}`, JSON.stringify([]));
}, s);
}
// 第一次清除動作
$('table#ChatTable').find('.SquareCssResource-chatContent').each(function () {
let Post_Name = $(this).find('.GlobalCssResource-colorNickname');
let Post_Content = $(this).find('.SquareCssResource-message');
// 主播版的圖片轉換
if (anchor) {
anchor_image(Post_Name, Post_Content, true);
}
Blocked(Post_Name);
if (config.keyword) {
RemoveKeyword(Post_Name.text(), Post_Content);
}
RemoveEmoji(Post_Content);
});
// 網頁開啟時的色碼檢查
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
if (config.seeColor) {
$('.SquareCssResource-chatContent').each(function () {
let rgb = $(this).find('.GlobalCssResource-colorNickname').css('color');
let userColor = $('<span>' + rgb2hex(rgb) + '</span>').css({ "color": rgb2hex(rgb), "font-weight": "normal", "padding-left": "5px" }).addClass('userColor');
$(this).find('.GlobalCssResource-colorNickname').after(userColor);
});
}
setTimeout(function () {
$('.SquareCssResource-mediaContent').each(function () {
mediaBoost($(this));
});
}, 1500);
// 在線上使用者、封鎖使用者的按鈕上加入Class
$('.SquareCssResource-inputAreaTool td:eq(1) div').addClass('list-fix');
$('.SquareCssResource-inputAreaTool td:eq(5) div').addClass('list-fix');
// 點了Class後,加入@功能與色碼檢視
$('.list-fix').on('click', function () {
setTimeout(function () {
let table = $('div.dialogContent').find('table[cellspacing="5"]').css({ 'display': 'block' }),
tbody = $(table).find('tbody').css({ 'display': 'block' }),
tr = $(table).find('tr').css({ 'display': 'inline', 'width': '50%', 'float': 'left' }),
td = $(table).find('td').css({ 'display': 'block', 'padding': '3px 0', 'height': '20px' }),
text;
$(td).each(function () {
$(this).find('.SquareCssResource-chatName').css({ 'display': 'inline' });
let userName = $(this).find('.GlobalCssResource-colorNickname').text();
let userColor = $(this).find('.GlobalCssResource-colorNickname').css('color');
let at = $('<span>@</span>').css({ 'padding-right': '2px', 'cursor': 'pointer', 'color': userColor });
$(at).click(function () {
text = $('textarea.SquareCssResource-messageInputField').val();
$('textarea.SquareCssResource-messageInputField').val(`${text} @${userName} `);
$('div.gwt-DialogBox').remove();
});
$(this).prepend(at);
$('<span></span>').css({ 'color': userColor, 'padding-left': '5px' }).text(rgb2hex(userColor)).appendTo($(this).find('.SquareCssResource-chatName'));
});
}, 500);
});
// 增加黑名單對象
$('#addBlockUser').click(function () {
modal('請選擇要加入黑名單的對象');
let userArray = [];
$('.SquareCssResource-chatContent:visible').each(function () {
let userName = $(this).find('.GlobalCssResource-colorNickname').text();
let userColor = $(this).find('.GlobalCssResource-colorNickname').css('color');
userArray.push({ name: userName, color: userColor });
});
blockArray = [...new Set(userArray.map(item => JSON.stringify(item)))].map(item => JSON.parse(item));
// blockArray的處理參照這篇文章 https://guahsu.io/2018/04/JavaScript-Duplicates-Array-Object/
// console.log(blockArray);
$(blockArray).each(function () {
let li = $('<li></li>').attr({ 'role': 'menuitem', 'title': `將 ${this.name} 加入黑名單` }).css({ "cursor": "pointer", "font-weight": "400", "border-top": "1px solid #bbb" }).addClass('gwt-MenuItem blocked').appendTo('#block_list');
$('<span></span>').css({ 'color': this.color, 'font-weight': 'bold' }).text(this.name).appendTo(li);
$('<span></span>').css({ 'color': this.color, 'padding-left': '10px' }).text(rgb2hex(this.color)).appendTo(li);
});
$('.blocked').hover(function () {
$(this).css('background-color', '#eee');
}, function () {
$(this).css('background-color', '#fff');
});
$('.gwt-MenuItem.blocked').click(function () {
let blocklistName = $(this).find('span:first').text(),
blocklistColor = $(this).find('span:first').css('color'),
blockUser = {};
console.log(`已將 ${blocklistName} 加入黑名單,識別色碼為 ${blocklistColor}`);
// 建立JSON資料格式
if (localStorage.getItem('blacklist') === null) {
blockArray = [];
} else {
blockArray = JSON.parse(localStorage.getItem("blacklist"));
}
blockUser.name = blocklistName;
blockUser.color = blocklistColor;
blockArray.push(blockUser);
localStorage.setItem("blacklist", JSON.stringify(blockArray));
$(this).remove();
$('table#ChatTable').find('.GlobalCssResource-colorNickname').each(function () {
Blocked($(this));
});
});
});
// 查看黑名單
$('#viewBlockUser').click(function () {
modal('點擊名稱可將對象移除名單');
$(JSON.parse(localStorage.getItem('blacklist'))).each(function () {
let li = $('<li></li>').attr({ 'role': 'menuitem', 'title': `將 ${this.name} 從黑名單中剔除` }).css({ "cursor": "pointer", "font-weight": "400", "border-top": "1px solid #bbb" }).addClass('gwt-MenuItem unblock').appendTo('#block_list');
$('<span></span>').css({ 'color': this.color, 'font-weight': 'bold' }).text(this.name).appendTo(li);
$('<span></span>').css({ 'color': this.color, 'padding-left': '10px' }).text(rgb2hex(this.color)).appendTo(li);
});
$('.unblock').hover(function () {
$(this).css('background-color', '#eee');
}, function () {
$(this).css('background-color', '#fff');
});
$('.gwt-MenuItem.unblock').click(function () {
// 取得解除對象的ID與色碼
let blocklistName = $(this).find('span:first').text();
let blocklistColor = $(this).find('span:first').css('color');
if (localStorage.getItem('blacklist') !== null) {
// 取出黑名單的Json
blockArray = JSON.parse(localStorage.getItem('blacklist'));
// 對黑名進行一次遍歷
for (let key in blockArray) {
// 將解除對象的名稱與顏色進行比對
if (blockArray[key]['name'] == blocklistName && blockArray[key]['color'] == blocklistColor) {
console.log(`解除封鎖 ${blockArray[key]['name']} ${blockArray[key]['color']}`);
blockArray.splice(key, 1);
}
}
// console.log(blockArray);
localStorage.setItem("blacklist", JSON.stringify(blockArray));
}
$(this).remove();
});
});
// 相簿模式
$('#Album_Mode').click(function () {
$('body').css('overflow', 'hidden');
$('<div></div>').attr('id', 'dark_curtain').css({ 'position': 'fixed', 'top': '0', 'bottom': '0', 'left': '0', 'right': '0', 'background-color': 'rgba(0,0,0,.75)', 'overflow-y': 'auto', 'z-index': '999' }).appendTo('body');
$('<div></div>').attr('id', 'album_panel').css({ 'background': '#fff', 'box-sizing': 'border-box', 'width': '80%', 'min-height': '100vh', 'margin': '0 auto', 'padding': '5px 0', 'column-gap': '0', 'column-count': '4', 'counter-reset': 'item-counter', 'position': 'relative', 'z-index': '1010' }).appendTo('#dark_curtain');
$('<div><h2>相簿模式</h2><p>提供快速閱覽與另存圖片的介面</p></div>').css({ 'text-align': 'center', }).appendTo('#album_panel');
$('<div></div>').css({ 'left': '0', }).addClass('close_curtain').appendTo('#dark_curtain');
$('<div></div>').css({ 'right': '0' }).addClass('close_curtain').appendTo('#dark_curtain');
$('.SquareCssResource-mediaFlow .SquareCssResource-imageMediaThumb').each(function () {
let url = $(this).attr('src'),
node = $('<div></div>').css({ 'background-color': '#fff', 'border': '1px solid #bbb', 'box-sizing': 'border-box', 'border-radius': '5px', 'padding': '5px' }).addClass('album_node'),
link = $('<a></a>').attr({ 'href': url, 'target': '_blank' }).css({ 'display': 'block', 'outline': 'none' }).appendTo(node),
image = $('<img>').attr({ 'src': url, 'tittle': '點擊開新分頁' }).css({ 'width': '100%', 'height': 'auto', 'border-radius': '5px' }).appendTo(link);
$('<div></div>').addClass('album_item').append(node).appendTo('#album_panel');
$('.album_item').css({ 'background-color': 'transparent', 'box-sizing': 'border-box', 'padding': '10px', '-webkit-column-break-inside': 'avoid', 'break-inside': 'avoid', 'counter-increment': 'item-counter' });
});
$('.album_node').hover(function () {
$(this).css('box-shadow', '0px 1px 5px rgba(0,0,0,.25)');
}, function () {
$(this).css('box-shadow', 'none');
});
$('.close_curtain').css({ 'cursor': 'pointer', 'width': '15%', 'position': 'fixed', 'top': '0', 'bottom': '0', 'z-index': '1005' }).click(function () {
$('body').css('overflow', 'unset');
$('#dark_curtain').fadeOut(300, function () { $('#dark_curtain').remove(); });
});
});
// 清除所有好料
$('#clearMedia').click(function () {
$('.SquareCssResource-mediaFlow').find('table').find('tr').hide();
$('.SquareCssResource-mediaFlow').find('table').find('.SquareCssResource-mediaContent').remove();
});
// Kekeke Plus設定
$('#KekekeConfig').click(function () {
$(this).toggleClass('init');
if ($(this).hasClass('init')) {
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
$(this).parent().css('position', 'relative');
$('<div id="KekekeConfig_panel"></div>').attr('id', 'KekekeConfig_panel').css({ 'background-color': '#fff', 'border': '1px solid #bbb', 'color': '#000', 'width': '250px', 'padding': '5px', 'position': 'absolute', 'top': '30px', 'z-index': '999' }).insertAfter('#KekekeConfig');
$('<div><label><input type="checkbox" id="cb_matchName" checked="checked">以ID執行黑名單遮蔽</label></div>').appendTo('#KekekeConfig_panel');
$('<div><label><input type="checkbox" id="cb_matchColor" checked="checked">以色碼執行黑名單遮蔽</label></div>').appendTo('#KekekeConfig_panel');
$('<div><label><input type="checkbox" id="cb_replace" checked="checked">遮蔽@黑名單ID的對話</label></div>').appendTo('#KekekeConfig_panel');
$('<div><label><input type="checkbox" id="cb_keyword" checked="checked">遮蔽有下方關鍵字的對話</label></div>').appendTo('#KekekeConfig_panel');
let block_keyword = $('<textarea></textarea>').attr({ 'id': 'block_keyword', 'rows': '2', 'title': '輸入關鍵字,並使用半形使用,做分隔', 'placeholder': '輸入關鍵字,並使用半形使用,做分隔' }).css({ 'width': 'calc(100% - 17px)', 'margin-left': '17px', 'resize': 'vertical', 'font-size': '14px' }).val(config.Block_Word);
$('<div></div>').append(block_keyword).appendTo('#KekekeConfig_panel');
$('<div><label>移除下方的表情符號<small>(對話不會消失)</small></label></div>').css('padding-left', '17px').appendTo('#KekekeConfig_panel');
let block_emoji = $('<textarea></textarea>').attr({ 'id': 'block_emoji', 'rows': '2', 'title': '輸入emoji的文字內容,例如(@),並使用半形,做分隔', 'placeholder': '輸入emoji的文字內容,例如(@),並使用半形,做分隔' }).css({ 'width': 'calc(100% - 17px)', 'margin-left': '17px', 'resize': 'vertical', 'font-size': '14px' }).val(config.Block_Emoji);
$('<div></div>').append(block_emoji).appendTo('#KekekeConfig_panel');
$('<div><label><input type="checkbox" id="cb_tabTip" checked="checked">發文通知</label></div>').appendTo('#KekekeConfig_panel');
$('<div><label title="被人@時會有聲音提示"><input type="checkbox" id="cb_beep" checked="checked">點名音效</label><input type="range" id="cb_beep_volume" class="button_setting"><span style="float: right;">🔊</span></div>').appendTo('#KekekeConfig_panel');
$('#cb_beep_volume').attr({ 'min': '0', 'max': '1', 'step': '0.1', 'value': config.Beep_volume }).css({ 'width': '100px' });
$('<div><label><input type="checkbox" id="cb_seeColor" checked="checked">檢視ID色碼</label></div>').appendTo('#KekekeConfig_panel');
$('<div><label style="margin-right: 3px;"><input type="checkbox" id="cb_imgur" checked="checked">使用imgur圖床</label><input type="password" id="imgur_API" placeholder="請輸入imgur API"></div>').appendTo('#KekekeConfig_panel');
$('#imgur_API').val(config.imgur_API);
$('#imgur_API').focus(function() {
$(this).attr('type','textbox');
});
$('#imgur_API').blur(function() {
$(this).attr('type','password');
});
$('<div><label><input type="checkbox" id="cb_Custom_Style" checked="checked">自訂版面顏色</label></div>').appendTo('#KekekeConfig_panel');
$('<div class="set_color"><label>背景顏色</label><input type="button" id="def_body_color" class="button_setting" value="預設"><input type="color" id="cb_body_color" class="button_setting color_select"></div>').appendTo('#KekekeConfig_panel');
$('<div class="set_color"><label>輔助顏色</label><input type="button" id="def_link_color" class="button_setting" value="預設"><input type="color" id="cb_link_color" class="button_setting color_select"></div>').appendTo('#KekekeConfig_panel');
$('<div class="set_color"><label>文字顏色</label><input type="button" id="def_font_color" class="button_setting" value="預設"><input type="color" id="cb_font_color" class="button_setting color_select"></div>').appendTo('#KekekeConfig_panel');
// 顏色選擇器的預設顏色
$('#cb_body_color').val(config.Body_Color);
$('#cb_link_color').val(config.Link_Color);
$('#cb_font_color').val(config.Font_Color);
$('<div class="set_color"><label>顏色濃度</label><input type="range" id="cb_chat_color" class="button_setting color_select"><span style="float: right;">🎨</span></div>').appendTo('#KekekeConfig_panel');
$('#cb_chat_color').attr({ 'min': '0.05', 'max': '0.9', 'step': '0.05', 'value': config.Chat_Color }).css({ 'width': '100px' });
$('<div style="padding-top: 3px"><button type="button" id="save_config" class="button_setting" title="儲存後將自動重新整理">儲存設定</button></div>').appendTo('#KekekeConfig_panel');
$('.set_color').css({ 'padding': '3px 0 0 17px', 'overflow': 'hidden' });
$('.button_setting').css({ 'height': '20px', 'float': 'right', 'margin': '0 2px', 'padding': '0', 'font-size': '10px', 'box-sizing': 'border-box' });
// 開啟面板時,各選項的勾選狀態
if (!config.matchName) $('#cb_matchName').attr('checked', false);
if (!config.matchColor) $('#cb_matchColor').attr('checked', false);
if (!config.replace) $('#cb_replace').attr('checked', false);
if (!config.keyword) $('#cb_keyword').attr('checked', false);
if (!config.tabTip) $('#cb_tabTip').attr('checked', false);
if (!config.Beep) $('#cb_beep').attr('checked', false);
if (!config.seeColor) $('#cb_seeColor').attr('checked', false);
if (!config.imgur) $('#cb_imgur').attr('checked', false);
if (!config.Custom_Style) {
$('#cb_Custom_Style').attr('checked', false);
$('.set_color').css('display', 'none');
}
// checkboxk的變換
$('#cb_matchName').on('change', function () {
config.matchName = this.checked ? true : false;
});
$('#cb_matchColor').on('change', function () {
config.matchColor = this.checked ? true : false;
});
$('#cb_replace').on('change', function () {
config.replace = this.checked ? true : false;
});
$('#cb_keyword').on('change', function () {
config.keyword = this.checked ? true : false;
});
$('#cb_tabTip').on('change', function () {
config.tabTip = this.checked ? true : false;
});
$('#cb_beep').on('change', function () {
config.Beep = this.checked ? true : false;
});
$('#cb_beep_volume').on('change', function () {
config.Beep_volume = $('#cb_beep_volume').val();
});
$('#cb_seeColor').on('change', function () {
config.seeColor = this.checked ? true : false;
});
$('#cb_imgur').on('change', function () {
config.imgur = this.checked ? true : false;
});
$('#cb_Custom_Style').on('change', function () {
if (this.checked) {
config.Custom_Style = true;
$('.set_color').css('display', 'block');
CustomStyle(config);
} else {
config.Custom_Style = false;
$('.set_color').css('display', 'none');
$('#Custom_Style').html('');
}
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
});
$('.color_select').on('change', function () {
config.Body_Color = $('#cb_body_color').val();
config.Link_Color = $('#cb_link_color').val();
config.Font_Color = $('#cb_font_color').val();
config.Chat_Color = $('#cb_chat_color').val();
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
CustomStyle(config);
});
$('#def_body_color').click(function () {
$('#cb_body_color').val('#444444');
config.Body_Color = $('#cb_body_color').val();
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
CustomStyle(config);
});
$('#def_link_color').click(function () {
$('#cb_link_color').val('#FFAA00');
config.Link_Color = $('#cb_link_color').val();
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
CustomStyle(config);
});
$('#def_font_color').click(function () {
$('#cb_font_color').val('#EEEEEE');
config.Font_Color = $('#cb_font_color').val();
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
CustomStyle(config);
});
$('#save_config').click(function () {
config.Block_Word = $('#block_keyword').val();
config.Block_Emoji = $('#block_emoji').val();
config.imgur_API = $('#imgur_API').val();
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
$('#KekekeConfig').removeClass('init');
$('#KekekeConfig_panel').remove();
location.reload();
});
} else {
$('#KekekeConfig_panel').remove();
}
});
// Kekeke Logs設定
$('#KekekeLogs').click(function () {
$(this).toggleClass('init');
if ($(this).hasClass('init')) {
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
$(this).parent().css('position', 'relative');
$('<div id="KekekeLogs_panel"></div>').css({ 'background-color': '#fff', 'border': '1px solid #bbb', 'color': '#000', 'width': '300px', 'padding': '5px', 'position': 'absolute', 'top': '30px', 'z-index': '999' }).insertAfter('#KekekeLogs');
$('<table></table>').css({ 'width': '100%', 'table-layout': 'fixed' }).appendTo('#KekekeLogs_panel');
$('<tr><td width="65px">自動記錄</td><td><label><input type="checkbox" id="cb_Auto_Logs" checked="checked">啟用自動紀錄</label></td></tr>').appendTo('#KekekeLogs_panel > table');
$('<tr><td></td><td><label><input type="checkbox" id="cb_Logs_Time" checked="checked">加入時間戳記</label></td></tr>').appendTo('#KekekeLogs_panel > table');
$('<tr><td>下載紀錄</td><td><select id="cb_Download_Time" style="width:100%"></select></td></tr>').appendTo('#KekekeLogs_panel > table');
$('<option></option>').attr({ 'value': '1', 'selected': check_download_time(1, config.Download_Time) }).text('每1小時').appendTo('#cb_Download_Time');
$('<option></option>').attr({ 'value': '2', 'selected': check_download_time(2, config.Download_Time) }).text('每2小時').appendTo('#cb_Download_Time');
$('<option></option>').attr({ 'value': '4', 'selected': check_download_time(4, config.Download_Time) }).text('每4小時').appendTo('#cb_Download_Time');
$('<option></option>').attr({ 'value': '6', 'selected': check_download_time(6, config.Download_Time) }).text('每6小時').appendTo('#cb_Download_Time');
$('<div></div>').css({ 'padding-top': '3px' }).appendTo('#KekekeLogs_panel');
$('<button></button>').attr({ 'id': 'save_logs_config', 'type': 'button', 'title': '儲存後將自動重新整理' }).addClass('button_setting').text('儲存設定').appendTo('#KekekeLogs_panel > div');
$('<button></button>').attr({ 'id': 'save_logs', 'type': 'button' }).addClass('button_setting').text('下載對話紀錄').appendTo('#KekekeLogs_panel > div');
$('.button_setting').css({ 'height': '20px', 'float': 'right', 'margin': '0 2px', 'padding': '0', 'font-size': '10px', 'box-sizing': 'border-box' });
// 開啟面板時設定狀態
if (!config.Auto_Logs) $('#cb_Auto_Logs').attr('checked', false);
if (!config.Logs_Time) $('#cb_Logs_Time').attr('checked', false);
$('#cb_Auto_Logs').on('change', function () {
config.Auto_Logs = this.checked ? true : false;
});
$('#cb_Logs_Time').on('change', function () {
config.Logs_Time = this.checked ? true : false;
});
$('#cb_Download_Time').on('change', function () {
config.Download_Time = $('#cb_Download_Time').val();
});
$('#save_logs').click(function () {
console.save(JSON.parse(localStorage.getItem(`logs_${defaultTitle}`)), document.title + '.' + getDateTimes(true, 'files') + '.log');
// 清空訊息紀錄
localStorage.setItem(`logs_${defaultTitle}`, JSON.stringify([]));
});
$('#save_logs_config').click(function () {
localStorage.setItem('kekeke_plug_config', JSON.stringify(config));
$('#KekekeLogs').removeClass('init');
$('#KekekeLogs_panel').remove();
location.reload();
});
} else {
$('#KekekeLogs_panel').remove();
}
});
// imgur 上傳設定
$('input[type=file]#imgur_upload').on("change", function () {
let $files = $(this).get(0).files;
if ($files.length) {
// 檢查API
if (config.imgur_API === 'API' || config.imgur_API === '') {
alert("請先從Kekekeᴾˡᵘˢ設定選項填入imgur API,\n如不知道API設定,請參考Kekekeᴾˡᵘˢ首頁的說明。");
return false;
}
// 檢查size
if ($files[0].size > $(this).data("max-size") * 1024) {
alert("圖片大小超過5MB,上傳失敗。");
return false;
}
let settings = {
async: false,
crossDomain: true,
processData: false,
contentType: false,
type: 'POST',
url: 'https://api.imgur.com/3/image',
headers: {
Authorization: 'Client-ID ' + config.imgur_API,
Accept: 'application/json'
},
mimeType: 'multipart/form-data'
};
let formData = new FormData();
formData.append("image", $files[0]);
settings.data = formData;
// Image URL available at response.data.link
$.ajax(settings).done(function (response) {
console.log(JSON.parse(response));
let data = JSON.parse(response).data;
let url = data.link.replace('https', 'http').replace('.gif', '.jpg');
let text = $('textarea.SquareCssResource-messageInputField').val();
$('textarea.SquareCssResource-messageInputField').val(`${text}${url} `);
}).fail(function (response) {
let data = JSON.parse(response.responseText).data;
if (data.error == 'Invalid client_id') {
alert("因imgur API不正確,圖片上傳失敗。");
} else {
alert("圖片上傳失敗,請檢查imgur API是否設置正確。");
}
});
}
});
/* imgur 上傳設定的參考資料
* https://ctrlq.org/code/20526-javascript-image-uploader
*/
}
});
rootObserver.observe(document, observeConfig);
}
/* MutationObserver的參考資料
* https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
* https://www.htmlgoodies.com/beyond/javascript/respond-to-dom-changes-with-mutation-observers.html
* https://javascript.ruanyifeng.com/dom/mutationobserver.html
* https://segmentfault.com/a/1190000015215393 */
// 將主播版的圖片連結文字轉為連結
function anchor_image(Name, Content, each) {
if (image_url.test(Content.html())) {
let Message = Content.text().split(' @ ');
let match = image_url.exec(Message[0]);
let new_text = Message[0].replace(image_url, '<a class="GlobalCssResource-external" target="_blank" ref="noopener" href="$1">$1</a>');
Content.html(`${new_text}<span class="SquareCssResource-chatDate"> @ ${Message[1]}</span>`);
let image_media = `
<tr>
<td style="vertical-align: top;" align="left">
<table class="SquareCssResource-media">
<tbody>
<tr>
<td>
<table class="SquareCssResource-mediaHeader" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="vertical-align: top;" align="left">
<div class="SquareCssResource-mediaHeaderLeft">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAELUlEQVR42u1W609bZRhnwy3TuKEgASUmkpSwT4RMaodzLmj4tPXeA9NkJjNmxi3QtVzaUkpPb6d3KL23lLZjUCiF7d8xftknZ+IHFjXL6th8fJ53B61zTspY9ANv8vT0nPfy+72/5/K+DQ0H7aD931ufrG+QG+auaDQaaT3zlDrlWQ2nusJx6o/2DK4d0n6pN47+4BFcD6+NXP1Wo1EM7GaeWqfQjF6/dofm6Q0jd3Q69YW6wTmO6zZZJh4sLRchnUlAaXUZJk1j99RqxeDz5il0iotWm6W6UroJ6WwCbiwV4Lpx9K5cLn+rvt1rVUOR+TBEomFwCw6YnQsgiZtIYnzrn0gQuG3GWi2tLUNoNsDmJdNxELxukGvkdbmwQcEpui1TJlSgAP6gwIzIrJVLYDJP/I0Egc/w09VypcTGBUJeNB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width="32" height="32">
<div class="gwt-HTML">${Name.text()} @ ${Message[1]}</div>
</div>
</td>
<td style="vertical-align: top;" align="right"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<img class="gwt-Image SquareCssResource-imageMediaThumb SquareCssResource-mediaContent" src="${match[1]}">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
`;
if (each) {
$('.SquareCssResource-mediaFlow.SquareCssResource-eventSection > tbody > tr:last-child > td > table > tbody').append(image_media);
} else {
$('.SquareCssResource-mediaFlow.SquareCssResource-eventSection > tbody > tr:last-child > td > table > tbody').prepend(image_media);
}
$('img.gwt-Image.GlobalCssResource-img16.SquareCssResource-deleteIcon').click(function () {
$(this).parents('.SquareCssResource-media').remove();
});
}
}
// 從關鍵字設定遮蔽聊天內容
function RemoveKeyword(Post_Name, Post_Content) {
config = JSON.parse(localStorage.getItem('kekeke_plug_config'));
let keyword = config.Block_Word.split(',');
keyword.forEach(function (item, index) {
if (Post_Content.text().indexOf(keyword[index]) >= 0) {
Post_Content.parents('.SquareCssResource-chatContent').remove();
console.log(`${Post_Name}發了含有 [${keyword[index]}] 的訊息,已將訊息移除。`);
}
});
}
// 從emoji設定遮蔽聊天訊息中的表情符號
function RemoveEmoji(Post_Content) {
let emoji = config.Block_Emoji.split(',');
emoji.forEach(function (item, index) {
if (Post_Content.find('.GlobalCssResource-smiley').attr('alt') == emoji[index]) {
Post_Content.find($('.GlobalCssResource-smiley').attr('alt', emoji[index])).remove();
console.log(`偵測到含有 ${emoji[index]} 的對話,移除emoji。`);
}
});
}
// 實際執行遮蔽的function
function actionBlock(element) {
// 確認封鎖對象有沒有發出超鏈結
let text = element.parents('.SquareCssResource-chatContent').find('.SquareCssResource-message');
let links = element.parents('.SquareCssResource-chatContent').find('.GlobalCssResource-external').attr('href');
// 發文有含連結,但避開是刪除好料的連結
if (links && text.html().indexOf('delete') == -1) {
// 判斷鏈結是不是youtube網址
const regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
let youtubeLink = links.match(regExp);
if (youtubeLink && youtubeLink[7].length == 11) {
// 移除youtube影片
$('iframe[src="https://www.youtube.com/embed/' + youtubeLink[7] + '"]').parents('.SquareCssResource-media').hide();
$('.SquareCssResource-mediaFlow').find($('iframe[src="https://www.youtube.com/embed/' + youtubeLink[7] + '"]')).remove();
console.log(`移除影片 https://www.youtube.com/embed/${youtubeLink[7]}`);
} else {
// 移除圖片或其他鏈結方式的影片
$('[src*="' + links.split('://')[1] + '"]').parents('.SquareCssResource-media').hide();
$('[src*="' + links.split('://')[1] + '"]').remove();
console.log(`移除圖片 ${links}`);
}
}
element.parents('.SquareCssResource-chatContent').hide();
console.log(`發現黑名單對象 ${element.text()} 的發言,進行遮蔽`);
}
// 呼叫modal
function modal(text) {
$('body').css('overflow', 'hidden');
$('<div id="dark_curtain"></div>').css({ 'cursor': 'pointer', 'position': 'fixed', 'top': '0', 'bottom': '0', 'left': '0', 'right': '0', 'background-color': 'rgba(0,0,0,.5)', 'z-index': '999' }).appendTo('#MenuBar');
$('<ul id="block_list"></ul>').css({ 'border': '1px solid #bbb', 'border-radius': '5px', 'position': 'fixed', 'width': '400px', 'max-height': '85vh', 'background': '#fff', 'margin': '0', 'padding': '0', 'list-style': 'none', 'top': '50px', 'left': 'calc(50vw - 200px)', 'overflow': 'auto', 'z-index': '1000' }).appendTo('#MenuBar');
$('<li>' + text + '</li>').css({ 'padding': '0 10px', 'text-align': 'center', 'background-color': '#eee', 'border-radius': '5px 5px 0 0' }).appendTo('#block_list');
$('.gwt-MenuItem:last').css('border-radius', '0 0 5px 5px');
$('#dark_curtain').click(function () {
$('body').css('overflow', 'unset');
$('#dark_curtain').fadeOut(300, function () { $('#dark_curtain').remove(); });
$('#block_list').fadeOut(300, function () { $('#block_list').remove(); });
});
}
// 檢查下載時間
function check_download_time(v, t) {
if (v == t)
return true;
return false;
}
// 按鈕的滑入滑出效果
function hover() {
$('.gwt-MenuItem').hover(function () {
$(this).addClass("gwt-MenuItem-selected");
}, function () {
$(this).removeClass("gwt-MenuItem-selected");
});
}
// 色碼轉換的function
function rgb2hex(rgb) {
if (/^#[0-9A-F]{6}$/i.test(rgb)) return rgb;
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
function hex(x) {
return ("0" + parseInt(x).toString(16)).slice(-2);
}
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
/* RGB轉換的參考資料
* https://stackoverflow.com/questions/1740700/how-to-get-hex-color-value-rather-than-rgb-value
* */
}
// 日期+時間函數
function getDateTimes(get, mode) {
let text = '';
if (get) {
let dt = new Date(),
year = dt.getFullYear(),
month = (dt.getMonth() < 10 ? "0" : "") + dt.getMonth() + 1,
day = (dt.getDate() < 10 ? "0" : "") + dt.getDate(),
hours = (dt.getHours() < 10 ? "0" : "") + dt.getHours(),
minutes = (dt.getMinutes() < 10 ? "0" : "") + dt.getMinutes(),
seconds = (dt.getSeconds() < 10 ? "0" : "") + dt.getSeconds();
if (mode === 'logs') {
text = hours + ':' + minutes + ':' + seconds + " - ";
}
if (mode === 'files') {
text = year + month + day + '-' + hours + minutes + seconds;
}
}
return text;
}
// 套用自訂色彩
function CustomStyle(config) {
let Chat_Color_1 = config.Chat_Color;
let Chat_Color_2 = config.Chat_Color * 1 + 0.1;
let css = `
body,
.SquareCssResource-dockPanel,
.SquareCssResource-squareHeader {
background-color:${config.Body_Color};
}
.GlobalCssResource-footer {
background-color: transparent;
color: ${config.Link_Color};
text-align: center;
}
.gwt-MenuBar-horizontal{
background-color: rgba(255,255,255,0.15);
background-image: none;
border-width: 0 0 1px;
}
.gwt-MenuItemSeparator,
.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner {
background-color:#888;
}
.gwt-MenuBar .gwt-MenuItem-selected {
background-color: rgba(0,0,0,0.4);
}
.gwt-MenuBar-horizontal .gwt-MenuItem {
color: ${config.Font_Color};
}
.gwt-MenuBar-horizontal .gwt-MenuItemSeparator {
border-left: none;
}
.SquareCssResource-chatRoom .SquareCssResource-inputArea,
.SquareCssResource-mediaFlow .SquareCssResource-mediaHeader,
.SquareCssResource-posterPanel,
.SquareCssResource-voteChartPanel {
background-color: rgba(255,255,255,0.15);
color: ${config.Font_Color};
}.SquareCssResource-chatRoom .SquareCssResource-inputArea {
border-top-left-radius: 5px;
border-top-right-radius:5px;
}
.GlobalCssResource-colorBox {
background-color: rgba(255,255,255,0.15) !important;
border-radius:5px;
color: ${config.Link_Color} !important;
}
.GlobalCssResource-noOfCrowd {
padding:.5em;
}
.GlobalCssResource-colorBox,
.SquareCssResource-squareHeaderAddress,
.SquareCssResource-squareHeaderAddress > a,
.SquareCssResource-squareStatusPanel .SquareCssResource-kermaEnoughMenu,
.SquareCssResource-deviceShapeSelected,
.KmarkCssResource-kmark a,
.SquareCssResource-stickyPoster .SquareCssResource-title,
.SquareCssResource-lightningVote .SquareCssResource-title,
.SquareCssResource-mediaFlow .SquareCssResource-title,
.HomeCssResource-topicLink a {
color: ${config.Link_Color};
}
.KmarkCssResource-kmark {
color: ${config.Font_Color}
}
.google-visualization-table {
color:#333;
}
.SquareCssResource-chatRoom .SquareCssResource-chatContent.SquareCssResource-even:not([class*="SquareCssResource-replyToMe"]) {
background-color:rgba(255,255,255,${Chat_Color_1});
}
.SquareCssResource-chatRoom .SquareCssResource-chatContent:not([class*="SquareCssResource-replyToMe"]) {
background-color:rgba(255,255,255,${Chat_Color_2});
}
.SquareCssResource-chatRoom .SquareCssResource-replyToMe {
background-color: ${config.Link_Color} !important;
}
.SquareCssResource-chatRoom .SquareCssResource-chatContent .SquareCssResource-chatDate {
color:#666
}
.SquareCssResource-posterPanel {
padding:0
}
.SquareCssResource-eventSectionModeSelector{
background-color: transparent;
border-color: ${config.Link_Color};
color: ${config.Link_Color};
}
.SquareCssResource-eventSectionModeSelector:hover {
border-color: ${config.Font_Color};
color: ${config.Font_Color};
}
.SquareCssResource-eventSectionModeSelector option{
background-color: ${config.Body_Color};
color: ${config.Link_Color};
}
.SquareCssResource-eventSectionModeSelector option:hover{
color: ${config.Font_Color};
}`;
$('#Custom_Style').html(css);
}
function checkUser(name) {
if (/^[\u5e7c][\u5973][\u524d][\u7dda]$/.test(name.text()) && name.css('color') === 'rgb(156, 48, 13)') {
return true;
} else if (/[\u0023][\u0042][\u006f][\u0074]$/.test(name.text()) && name.css('color') === 'rgb(0, 0, 3)') {
return true;
} else { return false; }
}
function mediaBoost(element) {
let content = element.parents('.SquareCssResource-media');
// 判斷是否有滑出視窗的按鈕
if (content.find('.SLP-Icon').length === 0) {
let icon = $('<img>').addClass('SLP-Icon').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'vertical-align': 'middle' }).attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmmSURBVHhe7Z3bTxvZGcDzUHXVhz5XWmnVf6B971PVh/0DutKqD22f+lCpMUTJNmmTzW5osy1NFkPi5WqwPYDBxhcuBttAKIUA4WIMJoAJgQUCScDmGpJIq152T8839jme8QyOzdieGXs+6SfF8/nMnPl+PmdudrigReqovOL4QaWOWassYVCu0Zcw6/HNanFWVFwy/USseLkivlktzopKneWntGClDKq9Zs06VaXNmpB0gyuk5qoV/edkM+sYb9o0IemGJkRhoQlRWGhCFBaaEIUFV4jhcguaf/DoTFYfBdA3hxuiRU+FJiSD4ApJh4fOYdGip0ITkkFUXDT9WF9i+Y5b9FT4TH7RoqdCE5Jh6HXNv8fFGtDrmCEeJZZDUkig4YYNHW6ERYueCk1IFkJfyvwGC/kfV8b+euYyAE2IxMimDEATIiEqS8y/zaYMQJKQuzrT+/oS5pcwrxYblTrGjIv2bSYyIO9t9KEx1zD695H4KfG5hBhKDe/hT0Y999NRzKQjI7K2hOqvt9E2T2eCou87lxAswkEaFTvnkQHMDU6Ivjd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B4uhKDGv4CRo3B7S2jNF89acdgry5ZpDmG/7hEeTrbnfRPNMwJMhDIUm+vX2Cl3P2ztEcAK+5eXg/ycF6uDkAtkfydV90oaHJZ/IKsdb9k+1Y3e3YPH3vEytyeed5nXb5Q7QoNZ87eTmgoyuA5+/Yd3EbK7yCvBWExX9LyODRkpy3UGHNqN3+SJCvL48VqOpyC3J6+AUHvroe+8nCV9ftgpzTE2TbQb6hXPhhsNkm2e1CHvoByxrwAT7WHxmEmO752U6AhFbmIXJ0z/I6THD0zLJ5Vx9fFsHunsGFx3ksTyxvs08ia9u4aM7tx9Jax5DdwR+ZBJdvHlnxtkG8WB4kQd/EZAHQDtrDesTyNrzdNivuG+4HvK4tc8kvRCNBza08C8Ebuk82WF/eLdqpYgVG+P2rnD/+pWv+KF623EXVxeZf0Q3iub0Bn+XAgRfm0GLGXD2Aaj5zcmQw/71/qelH8bLlLsrKyr6nL7GE6IY1RNHrmOp4yXIf+j9YPtCkpEDH2MrKnN+Plys/ASOlotT8sV5nMcBfktGwGPEJTzmexn8WL5EWWmihhRZaaKGFFlpooYUWWkiJCxf+D99rRvGVyLLxAAAAAElFTkSuQmCC'),
button = $('<div></div>').attr('title', '滑出好料').css({ 'display': 'inline-block', 'line-height': '0', 'padding-left': '3px', 'padding-right': '3px' }).append(icon),
img,
defaultSet,
media;
if (content.find('video').length !== 0) {
$(content).find('table.SquareCssResource-mediaHeader').find('td[align="right"]').append('<div></div>');
}
$(button).click(function () {
if ($('#popup')) $('#popup').remove();
let popupTop = $('<div>滑出視窗</div>').attr('id', 'popupDrag').css({ 'cursor': 'move', 'text-align': 'center', 'line-height': '26px', 'user-select': 'none', 'position': 'absolute', 'top': '0', 'left': '0', 'right': '0', 'z-index': '101' }),
popupBottom = $('<div></div>').css({ 'user-select': 'none', 'padding': '3px 0', 'position': 'absolute', 'bottom': '0', 'left': '0', 'right': '15px', 'z-index': '101' }),
popupClose = $('<img>').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'margin': '3px 5px', 'vertical-align': 'middle', 'position': 'absolute', 'top': '0', 'right': '0', 'z-index': '102' }).attr({ 'title': '關閉滑出視窗', 'src': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ7SURBVHhe7dw9TsNAEEDh1JwKCcUVF6CAk8AV4EDQ8yM6hOAO0AKiCl4rT0JRDI53dnZmM0+aJsVm9zMgF9iLKIqiKIq89Xh8fHC3XF7fHh0drj9yV9p7OkM6y/ojndIX3nfdw/PJyfdd1314RBzw+r2nM6SzqCGC93p6+vV1dbV6Oz9feUMEL+09nSGdRQVxE4/xhLiJxxRHHMNjPCCO4THFEP/DYywjDnjL5SgeI444FY+xiDgVjxFD3BWPsYS4Kx6TjTgXj7GAOBePyUK87bqbp/4eadvCU6cmYi4ekwySxXrZ6Q0b6A+fu4EaiFJ42Xv3iGgGjzwhmsMjD4hm8cjyBkX31q8jjkcWEd3gkSVEd3hkAZE9vF9cbF176qjjUU1E93hUA7EZPNJEbA6PNBCbxaOSiM3jUQnEvcEjacS9wiPJn5rcC5H24AqPpBBzxi0e1UR0j0c1EJvBI03E5vBIA7FZPCqJ2DwelUDcGzwCMfceL427m2SJAjAj8OJXeEYl8JjmEUviMc0iauAxzSFq4jHNINbAY9wj1sRj3CJK4aV7vNx7RXeI4EkdXOpCuECUxkvrsWbziCXw1kuL/kkwiVgSj5pF1MCj5hA18agZxBp45B6xJh65RZTCk9i4O0RLeOQG0SIemUccNtgJPWhT6CqLIo78k+esPOCROURPeGQG0SMemUAUe+BaGY+kEGc/cC3yyH8lPMpFfDk7q/PeBAt4NBcxG492RbSER7siiuHRVESLeDQVURyP/kO0jEd/IX5eXpbDozHEAU/ixlOhbYgqeLSJ6AmPfiOq4hGI7l/A2COqv4CR0hf2G4hXgEZRFEVRVKXF4gcoL/mW3+i3nwAAAABJRU5ErkJggg==' }).click(function () { $('#popup').remove(); });
// 判斷是否為圖片、Youtube影片、Gif影片
if (content.find('.SquareCssResource-imageMediaThumb').length !== 0) {
img = $('<img>').attr({ 'id': 'popupImg', 'src': element.attr('src') }).css({ 'cursor': 'move', 'max-width': '100%', 'max-height': '100%', 'position': 'relative', 'top': '0' });
defaultSet = element;
media = $('<div></div>').attr('id', 'popupRotate').css({ 'transform': 'rotate(0deg)', 'text-align': 'center' }).append(img);
// 圖片左轉90°
$('<img>').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'margin-left': '5px', 'vertical-align': 'middle' }).attr({ 'title': '將圖片左轉90°', 'src': ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADhAAAA4QBAwW54QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAlpSURBVHic7Zt7UFTXGcB/5+4uC7jAggpKglGjQpVEGx/VappRm0RQksnDx5JJjFXjmEn7RyfT6bR/pOafTtMkbV5NEWIyqUZ8pMkEAW1jzENNME7wAdFViA/AF0JWHoKwe0//QAxwd5e99+4KM+lvhmH3u+d89/u+Pfc8vnsO/MgRkb7BP3J3JFpVy91CkZlI0gWkAykSnHT9AXgEeICLEtwI3EJytEOoe59+b9H3kbQvIgHIc+3KUPAul5AlEHcAikFVKnAESYliFe+u3JjlDqOZQBgDkPfUQZvScsmFyloEM8Oltw9fCinf9MWnFK5ZP60zHApNB2Dr4q1RHtuQtQLxWySjwmFUCJwRghd9juQ8s4EwFYC3lpbcpyq8CYw1o8cE1SDXrt688L9GFRgKwMuLt8bE2eL+ipRPG9URRlTgDas95ncr3pnbrreybuPzlu68S1HUzcAEvXUjjFtIXKsKs8v1VNLVO+e7iu9VFPVzwuB8yoREhiRFm1XTk3Qp+LxgWel8PZVCbgEFrtLlEvkWYNFtWg9inXZmPTmRMTNGUHOonl0vHDSjzh+dSB5f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u3PfsE371cZch5olFbLE3/6dK43UIF+84EFuTtnSKnuJkyJU4tN4eG/zCFhhHZoU32SSyc9nDpwnur952lv6vCjIWRaFCnnrixcGHQvbkgJ0fzc4geRYjsmdov2xO6wkTEvDcewGNquXKOloZ3mi1dpONNMx9WwHATxCnh41ebsov4Khr5ZelnpfCnkBwzydwgSmgQ8tHpz9iehlNeVEs9zlc5RkB8B2ozE4KBRSjXnqcJF+0OtoOu8wJrNWXtRuBM5+BZNAvZ6vb479TgPBo6zrd6UXdt2hfnAa3QdVxloVAGvxHtb5q/dllPXf/HemDw0tXOyKtQ3EMw2o8c48mPFojxj5jyh0QONAKzcsuBwXcaBXwjEkwJOmtGlE7eQ8om69K/vN3uYMmzvBbcu3mrx2BzLhMozET44+Xq8r3XLkm1LwpLE/f/R2XAr7MtgPzz9o+d/pWkrnH9WXTcAAAAASUVORK5CYII=' }).click(function () {
let angle = Rotate($('#popupRotate')) - 90;
$('#popupRotate').css('transform', 'rotate(' + angle + 'deg)');
if (angle == -90 || angle == 90 || angle == 270) {
$('#popup').height($('#popup').width());
$('#popupImg').css('top', ($('#popupRotate').height() - $('#popupImg').height()) / 2);
} else {
$('#popup').height($('#popup').width() / $('#popup').attr('data-ratio'));
$('#popupImg').css('top', '0');
}
}).appendTo(popupBottom);
// 圖片右轉90°
$('<img>').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'margin-left': '5px', 'vertical-align': 'middle' }).attr({ 'title': '將圖片右轉90°', 'src': ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADhAAAA4QBAwW54QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAkmSURBVHic7ZtpcBTHFcd/Pbur+wYkQCAuSwKBuTEC7DhAMAiQKRKulc0VrsJlkyoX5XJSqRzOh3xIbJeNHSIExNgYCYk4jkESFGdAgDnMfYkbgTACJHSsEL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KUp7r6AqdvJhzIbljQaMrOOZMjJz3/uh1wO0X+0Gan9FoV3Yd10JztMfuZiH8plvAOwZRerXTqqNaEkPz67U8WHGlYpnlnDZwSfzS8NHYcOvYIK0vuU3Grmi6DYzROEEIQFRdK0pg4ImJDEQKqS2tQa1s9cbq/uOfBJbt27WrUsNNcQEbapkFI5QA6T4V17t+OUUsGYAloXsxhV6ksuY/tbg3VZQ+4e6WCi3tuUvvIgA1Q57Crihy06MsJmojXZTIkIy33I6RYoreliNgQRi3pT1RnXVk2Ss7fY9MfD/hqZ+j9BZnjlzp74PLohhoSsxTEPr0tlRfb+Pdv93H0q4u6kiQxCZG06+HxYSiXEFBQ/H3gu66eu3TAohWD7cIkZlN3k0MXHHaV7zZcYMPS3RTuvO72RokXR+JcoUyaTbP+sGuky9m3xXzgyrTNL0ipbkdn4rQhAsP86DG8I12Htif6uQgUk7bZiu+r+erdAiNTazZFypHzsiYcbq6SWwnRjLTcSUixAQNOi/oFWWjTJZTQmCBC2gQQGO6P7W4N53Zc56HNkEsgALUCfj4/c/zGliq6f1h6Rv5oKeS/0LmH0NqQUClg8oLM8Tvcqa8rJZ5uzX9RQX4DGHK+3Qcok1JNXZg10e3JW9essygzpQCFvkj3F02tBQEFtbWOvnqMBw+usy34cvyNmgpGA8uou67ytKEK+Cis1jZ6cU5qsV5hLy9Nbe6nCvVTBCO84fEccptiUt705j6hVy/eeevHHS/uefAnAjFHwAVvuHSiUEg5qzjx0FhvL1MaduMre2q2qdwSMkOovOnji5OfhDmq10/LmWbIwuH/V2eNJmyKZ/3y9I8e/wXsghTTKE8haAAAAABJRU5ErkJggg==' }).click(function () {
let angle = Rotate($('#popupRotate')) + 90;
$('#popupRotate').css('transform', 'rotate(' + angle + 'deg)');
if (angle == -90 || angle == 90 || angle == 270) {
$('#popup').height($('#popup').width());
$('#popupImg').css('top', ($('#popupRotate').height() - $('#popupImg').height()) / 2);
} else {
$('#popup').height($('#popup').width() / $('#popup').attr('data-ratio'));
$('#popupImg').css('top', '0');
}
}).appendTo(popupBottom);
// 圖片水平翻轉
$('<img>').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'margin-left': '5px', 'vertical-align': 'middle' }).attr({ 'title': '將圖片水平翻轉', 'src': ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAOKAAADigGnjPUfAAAGymlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTExLTE4VDIyOjQyOjM3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0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l7NwVI7pMC5Mzf2smjWvSHMW988Jkgp5evlOvE75eydVCmd3YDnNERhhOs6bVYC+S7zHHyiJyuQKfrhQJ/bZt2+K634cid7yJnuoGukZeu4TKcueUzkO9vX5s7rz7GnwPSJTIi2ZyyvUZ68Bg4H+kA1zWAK7G5J0ktUKPxw7onKk5Zguv3Y3VlCK93XXx5vvkHK5/KgZVP5/UADd7TK/L0AxCY3DG6ILOeWFhvTApQjN7P0zVMXMnWwur0alhtrOkBkH7+vTK+Y1reHGfsjQoMOm1WYK51/mvAzT4EfOZB4Gf3pF8Bzt96GVAArTXGaoHAeBdz8/aCZSEKsGB/n/QrQNeoc1QAwN5UE3p9ZfivBZKfQQGAm7sbLFntYJ2/v08GLIAFU0eLzjdDmWwYtoZjqq6XHlOy2xstgJmuJElthIqklrstevGEunReHjaRHjrmA0zmpqgrPwZJAF7TAJXTt+G+f4SQLmXTfoEzDM0wSV+iUl6tU95ckUs4Rv6hoHcry14GVYCKR1vBwjSBFY8JRs+kYm1D51D0C/RdRLvO/4nAiImmDJfy0mYUBWiEorkO2IJ/V6UEvlOU6ViJQcdH/CDXBFVomda4y0WZzo3lyf7btyQ2Ka/lcrooC2BCAcrp3xoUY7YDBIN4i9XoycLCHRi0F6P08hEr616KQvzUhEaXpkpQnjQcBMhUmgNYZuGnVgabQb5fMMibeL3YHrGkzRBcgc70Va17rlBHg47ip8Wqk6eWpOFIlF5Ph2QwzXKhAPIwEoD1ggXboqCVUAAsDCvRKTbg9L4xmJTo0LB19jRfPbIP9zuDz+c/C3IOj52ypfkOIC7eIG3iDTJ9Rfb3djRESMNra2QopgJg1hprAijvFVuN3h+VpTaOK01tTOaMIl2TsAwztdVWvfgf+pQWe/OFeE6DTLCy4s94Vn1Vr1sA7eAI8D8DCnt7fnrhygAAAABJRU5ErkJggg==' }).click(function () {
$('#popupImg').toggleClass('horizontal-flip');
if ($('#popupImg').hasClass('horizontal-flip')) {
$('#popupImg').css('transform', 'rotatey(180deg)');
} else {
$('#popupImg').css('transform', 'rotatey(0deg)');
}
}).appendTo(popupBottom);
// 圖片垂直翻轉
$('<img>').css({ 'cursor': 'pointer', 'width': '20px', 'height': '20px', 'margin-left': '5px', 'vertical-align': 'middle' }).attr({ 'title': '將圖片垂直翻轉', 'src': ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAOKAAADigGnjPUfAAAGymlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTExLTE4VDIyOjQyOjM3KzA4OjAwIiB4bXA6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ggg==' }).click(function () {
$('#popupImg').toggleClass('vertical-flip');
if ($('#popupImg').hasClass('vertical-flip')) {
$('#popupImg').css('transform', 'rotatex(180deg)');
} else {
$('#popupImg').css('transform', 'rotatex(0deg)');
}
}).appendTo(popupBottom);
} else if (content.find('.SquareCssResource-youtubeWrapper').length !== 0) {
defaultSet = content.find('iframe');
media = defaultSet;
} else if (content.find('video').length !== 0) {
defaultSet = content.find('video');
media = defaultSet;
}
$(media).css({ 'display': 'block', 'width': '100%', 'height': '100%', 'user-select': 'none' });
let AspectRatio = defaultSet.width() / defaultSet.height();
let popup = $('<div></div>').attr({ 'id': 'popup', 'data-ratio': AspectRatio }).css({ 'background-color': '#333', 'border-radius': '5px', 'box-shadow': '0px 1px 4px 3px rgba(0,0,0,.2)', 'font-size': '12px', 'color': '#ccc', 'width': defaultSet.width(), 'height': defaultSet.height(), 'padding': '26px 0', 'position': 'fixed', 'top': '10vh', 'left': '50vw', 'z-index': '100', 'resize': 'horizontal', 'overflow': 'auto' });
$(popup).append(popupTop).append(popupClose).append(media).append(popupBottom).appendTo('.slide');
// console.log($('.popupDrag'));
content.hide();
dragElement(document.getElementById("popup"));
});
$(content).find('table.SquareCssResource-mediaHeader').find('td[align="right"] > div').prepend(button);
}
// 替換掉相似圖按鈕
if (content.find('.SquareCssResource-similarImageLink') && content.find('.GIS-Icon').length >= 0) {
let icon = $('<img>').addClass('GIS-Icon').css('vertical-align', 'middle').attr({ 'src': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABMsSURBVHhe7V1pcFvXdXb3fd/3pukPt0nb6XRLmzZt0noynaZtOmkyrTvTpE1rRwTARQQXUaRAiQSxg6REiyveA8BNpETQ2ixZtqzdkijJ1uZYliNvWurImyxrjZfb7zze93AfeAECIAg+ivhmvgEJ4G7n3HvPOXd5uK+EEkoooYSCIb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nmSt/pQptXYDa+PBoq8vaTeIMOR9XETFBXkPmBIUsTIezMOFGikiKahcid5MwmxbM6gJVixXSjLGK2OsJTjEXOoGVr8Dti7b5Z5UIl1zt3lNjjww3yOHKOgz3oM8Ti/oT7xO36pNPjWISLuFtEElbVghiZ5LDkEdnIq6nUnWYu6n8lNtQiG4amhMU7TYXoM29aIl7txPLzeo28XKkTGcq/dlVTZshgdWISiC6Ihel22sLRjIs4FSomIlKb6Ya5xiNdKoW90tLqlrHtVNKOSzXBTWAbcpbWJliWsQ0ee7zGIl1hxIsDa3+ZmSiDXetOTviYhARf8XdsX0QHvy9VdgqMsauhhIrri/dobteAUdcHH80GTIHvkDzKnPiw2guILWr2qy2GW0CmlU0HaD2A6tLTZ1v6UfRS4D/agvlKKmNoZsC23rzod7XCg6DyXYqsgonSkz1R1T1Ado05pF/WgputmLoW1sh+qkxq7uGclqX75YpE7SFIUinFLX9hVLGu98oD1Dxa40Ioo17nDoDFZEWWtoCO4kPLJ5iB2yIcUvLZ0jM1aetfpRnW3qqmI/u6UooMuOmH97QPNPCnH662JsddeIppzqDGtMcyW5r/VbN8KFHWE+RPOyutDeD0b2cNYXNBcz6AQGel4QjabD1VKB0N6E2z3EXP2jmpdTu2d6aTxnQvg1SNuQGGfNfaPM7RmcYRvMVG5TpwmV9f82r+7SAe1jQwB2GMun5cIxk5Tka4yztrYhtqZ9WBtNzT2jbHXvqPa65pER1rJ2GJ7RkLbYqe3fm38IID3hFWJENBXz7JelQT0SI6YZvfMkTRdSoRWapASb2oJX6yx7WBF0hpf2FCCsdaQgUGpzciOmIrt6DKOxnc4LF2IXcsmCzhnTVTvYnc9PT3GqF4Ltxt9xvCagMLrwST8DO47vDICdFC/g/6/Ts+Sz/e3DEkoooYQSSiihhBLuXdx33/8D1GkW2bDWkokAAAAASUVORK5CYII=', 'width': '20px', 'height': '20px', 'title': 'google iamge search' });
content.find('.SquareCssResource-similarImageLink').find('.GlobalCssResource-external').text('').append(icon);
}
// 替換掉海報按鈕
if (content.find('.SquareCssResource-posterCreator') && content.find('img.GlobalCssResource-img16')) {
content.find('.SquareCssResource-posterCreator').css({ 'padding-left': '3px', 'padding-right': '3px' });
content.find('.SquareCssResource-posterCreator').find('img').removeClass('GlobalCssResource-img16').attr({ 'src': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAqcSURBVHhe7Z3JcxvHFcaVfV8uWQ45JTmkklQlPiS3/APJJYfkEh9clYMqJgBSUkqhXLYCyyVblAiABHeQxAxAcAVBQlxEUeIiiosWyrK4iFps0rYsU5QiyXJkiZZUZXfeA6bBnp4GMAABKhr0V/UVF8wMp78ful/3YABuk5KSkpKSkpIqCFWUqN93OdTn3XbV7bYrVW6busNd1PRz7WGprZTLpjoAxMdgorNN/cxlVwM1RTXf1jaVyqfINvIFl12pN4AwWJn3Ovw/0HaTyocQBgTtY4OvdahkcGczGQEHiv0MEJVAT1mQUPKkOAy1iQ08VKyQ1VIfubsn7jtgBMNuA0PYooSSYzmdzi9CsH42aIRxs7QxAYP12C4JJW8K/zX8JRh6FDbgUIk/KQxqHgrUnYsSShY6uLv5O77tvq/g9wjDbVNUNlgzMKgllE3okCPwMyjYJyG0zwHCY5jW1uL0lQ00BkMQfCqLoJT/o+WH2p+VEgmC/wXAWGOD491aAjVDELgZj0oo5pVvGNQSigmJYHSq06SlZlQXXoNDeX+zQNA8FJh9LUkomkQwugDG5Pk1MvnmGgnVjOnCk1DyKBGMqt1t5OTsahxIKigmZ1ipLKEwSlUzRibe3QDyFKBUFjf9SDvNwlAqGMHKY3oYTwfKYtl23/e007W2UsFQPcMQ/A0xEPQWQoHZV0Q7ZevK86L/pzyMule6Y1+D3pHUMKgBinD2lQMox3kojuBz2qlbU7DqnmAb3KXOxEKeOPuhMXj8PRT39sbJmHXb5AkKXiX2FyuP6DGhlzi1U7eevI7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YBZX09BwkC5i5Q/0iBwrSECwPvCiP4NLSJnCwN6RqRgYaA8NuUFGka4IioEwPvR3ZXY4rDH2xe7W50NlPpif3oYYa6AFzwMFHsNq883KASQznffu0Quz8wSfBMnPVaqy+j3L4hh+Kz6EUeZCMbr12koo63HhYGbNe5Pj3XC32waBpyDdT9vKlNBD2mkwUz1jguDNusFWOHTY3Ud8IthHDTCsOznTWUjnNHQcN4cnhYGbdZrVxYTQVfvUsn6QhoYdjUsYXCCUKZoQKEDkbQLw1R+DMXeu7MlEfiN6fibae7PNUgYZgXBrLJBbRZK28GexLHwDvVkMCz7IcObEf7jdi6omDcDhS3sQ7XNJFxmWGd0SRhJ5Lb7f8OGxTpbKGxhN9imdkoYKVTu8P9FGJzmTKDg+8vxXt8rp2aFx5IwTMhlV/cIw2OMUPBl25m+CTLeMRJ7GTdaN0A6XVES3B8mvpfbSRVTyEWGYapDwjAhWIM0iwLMmR0KfFVqJAyTgrBOCoPM0h67+rCyJHCjaldwqeGV9kikuv9v2p+SMiMYss6Lgt2wcgu+TsGQ04u9CbYvg593uxzK3+H7P3vsyh88RYFfHSpSf1zwFwVzoXK7+ieXTb3itilvYdGFr6+5HOrz5S8qvyuY/1IpJSUlJSUlJZW9tm37HyxyDczQDoOYAAAAAElFTkSuQmCC', 'width': '20px', 'height': '20px' });
}
}
function Rotate(element) {
let matrix = element.css("-webkit-transform") || element.css("-moz-transform") || element.css("-ms-transform") || element.css("-o-transform") || element.css("transform"),
angle;
if (matrix !== 'none') {
let values = matrix.split('(')[1].split(')')[0].split(','),
a = values[0],
b = values[1];
angle = Math.round(Math.atan2(b, a) * (180 / Math.PI));
} else { angle = 0; }
return (angle < 0) ? angle += 360 : angle;
}
/* Rotate的參考資料
* https://gist.github.com/hoandang/5989980 */
function dragElement(element) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
// 有圖片的話,替圖片也加入dragMouseDown
if (document.getElementById(element.id + "Img")) {
document.getElementById(element.id + "Img").onmousedown = dragMouseDown;
}
document.getElementById(element.id + "Drag").onmousedown = dragMouseDown;
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// 取得滑鼠座標
pos3 = e.clientX;
pos4 = e.clientY;
// 滑鼠放開
document.onmouseup = closeDragElement;
// 滑鼠移動
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// 設定滑鼠移動後的座標
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// 新的座標寫入物件
element.style.top = (element.offsetTop - pos2) + "px";
element.style.left = (element.offsetLeft - pos1) + "px";
}
function closeDragElement() {
// 清空滑鼠事件
document.onmouseup = null;
document.onmousemove = null;
}
}
/* dragElement的參考資料
* https://www.w3schools.com/howto/howto_js_draggable.asp */
$('body').keydown(function (event) {
if (event.which == 27) {
$('#popup').fadeOut(300, function () { $('#popup').remove(); });
}
});
// 下載對話紀錄
(function (console) {
console.save = function (data, filename) {
if (!data) {
console.error('沒有保存任何對話紀錄');
return;
}
if (!filename) filename = 'autosave.log';
if (typeof data === "object") {
data = JSON.stringify(data, undefined, 4);
}
let blob = new Blob([data], { type: 'text/json' }),
e = document.createEvent('MouseEvents'),
a = document.createElement('a');
a.download = filename;
a.href = window.URL.createObjectURL(blob);
a.dataset.downloadurl = ['text/json', a.download, a.href].join(':');
e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
a.dispatchEvent(e);
};
})(console);
/* console.save的參考資料
* https://bgrins.github.io/devtools-snippets/#console-save */
});