WIP: use-strict
This commit is contained in:
parent
2583c3b80a
commit
bae73521e9
|
@ -62,7 +62,7 @@ function load() {
|
|||
<i class="material-icons">refresh</i>${lang.lang_manager_refresh}
|
||||
</a>
|
||||
<a class="waves-effect disTar pointer red-text" onclick="multiDel('${key}')">
|
||||
<i class="material-icons">delete</i>${lang.lang_manager_delete}"
|
||||
<i class="material-icons">delete</i>${lang.lang_manager_delete}
|
||||
</a><br />${lang.lang_manager_color}
|
||||
<div id="colorsel_${key}" class="colorsel"></div>
|
||||
</div>
|
||||
|
@ -317,7 +317,7 @@ function support() {
|
|||
Object.keys(idata).forEach(function(key) {
|
||||
var instance = idata[key]
|
||||
if (instance == 'instance') {
|
||||
templete =
|
||||
var templete =
|
||||
'<a onclick="login(\'' +
|
||||
key +
|
||||
'\')" class="collection-item pointer transparent">' +
|
||||
|
@ -951,7 +951,7 @@ function multisel() {
|
|||
var list = key * 1 + 1
|
||||
if (key == last) {
|
||||
sel = 'selected'
|
||||
mainb = '(' + lang.lang_manager_def + ')'
|
||||
var mainb = '(' + lang.lang_manager_def + ')'
|
||||
var domain = localStorage.getItem('domain_' + key)
|
||||
var profimg = localStorage.getItem('prof_' + key)
|
||||
var domain = localStorage.getItem('domain_' + key)
|
||||
|
@ -962,7 +962,7 @@ function multisel() {
|
|||
sel = ''
|
||||
mainb = ''
|
||||
}
|
||||
template = `
|
||||
var template = `
|
||||
<option value="${key}" data-icon="${acct.prof}" class="left circle" ${sel}>
|
||||
${acct.user}@${acct.domain}${mainb}
|
||||
</option>
|
||||
|
@ -978,7 +978,7 @@ function mainacct() {
|
|||
M.toast({ html: lang.lang_manager_mainAcct, displayLength: 3000 })
|
||||
}
|
||||
function colorpicker(key) {
|
||||
temp = `<div onclick="coloradd('${key}','def','def')" class="pointer exc">${lang.lang_manager_none}</div>
|
||||
var temp = `<div onclick="coloradd('${key}','def','def')" class="pointer exc">${lang.lang_manager_none}</div>
|
||||
<div onclick="coloradd('${key}','f44336','white')" class="red white-text pointer"></div>
|
||||
<div onclick="coloradd('${key}','e91e63','white')" class="pink white-text pointer"></div>
|
||||
<div onclick="coloradd('${key}','9c27b0','white')" class="purple white-text pointer"></div>
|
||||
|
|
|
@ -11,7 +11,7 @@ $(document).on('click', 'a', e => {
|
|||
if (url) {
|
||||
urls = url.match(/https?:\/\/(.+)/)
|
||||
//トゥートのURLぽかったら
|
||||
toot = url.match(/https:\/\/([^+_]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/)
|
||||
var toot = url.match(/https:\/\/([^+_]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/)
|
||||
if (!toot) {
|
||||
//Pleroma対策
|
||||
toot = url.match(/https:\/\/([^+_]+)\/users\/([a-zA-Z0-9_]+)\/statuses\/([0-9]+)/)
|
||||
|
|
|
@ -4,7 +4,7 @@ const shell = electron.shell
|
|||
var ipc = electron.ipcRenderer
|
||||
onmessage = function(e) {
|
||||
if (e.data[0] == 'openUrl') {
|
||||
urls = e.data[1].match(/https?:\/\/(.+)/)
|
||||
var urls = e.data[1].match(/https?:\/\/(.+)/)
|
||||
if (urls) {
|
||||
shell.openExternal(e.data[1])
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ function additionalIndv(tlid, acct_id, id) {
|
|||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
cards = json.card
|
||||
var cards = json.card
|
||||
var analyze = cardHtml(cards, acct_id, id)
|
||||
$('[toot-id=' + id + '] .additional').html(analyze)
|
||||
if (json.title) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
/*メディアフィルター機能*/
|
||||
//各TL上方のMedia[On/Off]
|
||||
function mediaToggle(tlid) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
function listMenu() {
|
||||
$('#left-menu div').removeClass('active')
|
||||
$('#listMenu').addClass('active')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
function escapeHTMLtemp(str) {
|
||||
if (!str) {
|
||||
return "";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//Integrated TL
|
||||
async function mixtl(acct_id, tlid, type, delc, voice) {
|
||||
localStorage.setItem('now', type)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//通知
|
||||
//取得+Streaming接続
|
||||
function notf(acct_id, tlid, sys) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//Integrated TL
|
||||
function mixtl(acct_id, tlid, type, delc, voice) {
|
||||
localStorage.removeItem('morelock')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//オブジェクトパーサー(トゥート)
|
||||
function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||
var splitter = new GraphemeSplitter()
|
||||
|
@ -539,11 +540,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
.match(
|
||||
/https?:\/\/([^+_]+)\/?(?!.*((media|tags)|mentions)).*([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)?/
|
||||
)
|
||||
urlsck = content.match(/(https?):\/\/([^<>]*?)\/([^"]*)/g)
|
||||
var urlsck = content.match(/(https?):\/\/([^<>]*?)\/([^"]*)/g)
|
||||
if (urlsck) {
|
||||
for (var urlct = 0; urlct < urlsck.length; urlct++) {
|
||||
var urlindv = urlsck[urlct]
|
||||
urlCont = urlindv.match(/(https?):\/\/([^a-zA-Z0-9.-]*?)\.(.+?)\/([^"]*)/)
|
||||
var urlCont = urlindv.match(/(https?):\/\/([^a-zA-Z0-9.-]*?)\.(.+?)\/([^"]*)/)
|
||||
if (urlCont) {
|
||||
urlindv = urlindv.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&')
|
||||
var encoded = encodeURI(urlCont[4])
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//アンケートのトグル
|
||||
function pollToggle() {
|
||||
if ($('#poll').hasClass('hide')) {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
$voise = null
|
||||
isBouyomi = localStorage.getItem('voice_bouyomi')
|
||||
$voiseName = lang.lang_speech
|
||||
$voices = speechSynthesis.getVoices()
|
||||
$synthes = new SpeechSynthesisUtterance()
|
||||
'use strict'
|
||||
var $voise = null
|
||||
var isBouyomi = localStorage.getItem('voice_bouyomi')
|
||||
var $voiseName = lang.lang_speech
|
||||
var $voices = speechSynthesis.getVoices()
|
||||
var $synthes = new SpeechSynthesisUtterance()
|
||||
$voise = $.grep($voices, function(n, i) {
|
||||
return n.name == $voiseName
|
||||
})[0]
|
||||
|
@ -12,14 +13,14 @@ speechSynthesis.cancel()
|
|||
if (!localStorage.getItem('voice_vol')) {
|
||||
localStorage.setItem('voice_vol', 1)
|
||||
}
|
||||
voiceRate = localStorage.getItem('voice_speed')
|
||||
var voiceRate = localStorage.getItem('voice_speed')
|
||||
$synthes.rate = voiceRate
|
||||
voicePitch = localStorage.getItem('voice_pitch')
|
||||
var voicePitch = localStorage.getItem('voice_pitch')
|
||||
$synthes.pitch = voicePitch
|
||||
voiceVol = localStorage.getItem('voice_vol')
|
||||
var voiceVol = localStorage.getItem('voice_vol')
|
||||
$synthes.volume = voiceVol
|
||||
function say(msgr) {
|
||||
msg = voiceParse(msgr)
|
||||
var msg = voiceParse(msgr)
|
||||
var voice = localStorage.getItem('voicebank')
|
||||
var obj = JSON.parse(voice)
|
||||
if (!obj) {
|
||||
|
@ -31,7 +32,7 @@ function say(msgr) {
|
|||
localStorage.setItem('voicebank', json)
|
||||
}
|
||||
}
|
||||
$repeat = setInterval(function() {
|
||||
var $repeat = setInterval(function() {
|
||||
if (!speechSynthesis.speaking) {
|
||||
var voice = localStorage.getItem('voicebank')
|
||||
if (voice) {
|
||||
|
@ -72,7 +73,7 @@ $repeat = setInterval(function() {
|
|||
}
|
||||
}, 300)
|
||||
function voiceParse(msg) {
|
||||
msg = $.strip_tags(msg)
|
||||
var msg = $.strip_tags(msg)
|
||||
msg = msg.replace(/#/g, '')
|
||||
msg = msg.replace(/'/g, '')
|
||||
msg = msg.replace(/"/g, '')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//検索
|
||||
//検索ボックストグル
|
||||
function searchMenu() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//タグ表示
|
||||
if (location.search) {
|
||||
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
'use strict'
|
||||
//TL取得
|
||||
moreloading = false
|
||||
var moreloading = false
|
||||
var errorct = 0
|
||||
function tl(type, data, acct_id, tlid, delc, voice, mode) {
|
||||
scrollevent()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
/*イメージビューワー*/
|
||||
//postのimg.jsとは異なります。
|
||||
function imgv(id, key, acct_id) {
|
||||
|
@ -76,7 +77,7 @@ function imgCont(type) {
|
|||
}
|
||||
function imageXhr(id, key, murl) {
|
||||
var startTime = new Date()
|
||||
xhr = new XMLHttpRequest()
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', murl, true)
|
||||
xhr.responseType = 'arraybuffer'
|
||||
xhr.addEventListener(
|
||||
|
@ -104,7 +105,7 @@ function imageXhr(id, key, murl) {
|
|||
)
|
||||
xhr.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
r = new FileReader()
|
||||
var r = new FileReader()
|
||||
r.readAsDataURL(this.response)
|
||||
r.onload = function() {
|
||||
var b64 = r.result
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//レイアウトの設定
|
||||
|
||||
var websocketOld = []
|
||||
|
@ -706,7 +707,7 @@ function setToggleTag(tlid) {
|
|||
}
|
||||
}
|
||||
function colorpicker(key) {
|
||||
temp = `<div onclick="coloradd('${key}','def','def')" class="pointer">Default</div>
|
||||
var temp = `<div onclick="coloradd('${key}','def','def')" class="pointer">Default</div>
|
||||
<div onclick="coloradd('${key}','f44336','white')" class="red white-text pointer">Red</div>
|
||||
<div onclick="coloradd('${key}','e91e63','white')" class="pink white-text pointer">Pink</div>
|
||||
<div onclick="coloradd('${key}','9c27b0','white')" class="purple white-text pointer">Purple</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
function menu() {
|
||||
localStorage.setItem("menu-done", true);
|
||||
$("#fukidashi").addClass("hide")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
function pip(id) {
|
||||
$("#pip-content").html($("[toot-id=" + id + "] .additional").html());
|
||||
$("#pip").removeClass("hide");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
/*ささやきボックス(Cr民並感)*/
|
||||
//✕隠す
|
||||
function hide() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
var r = document.getElementById("radio");
|
||||
function Rtoggle() {
|
||||
if ($("#radio").hasClass("play")) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//スクロールで続きを読む
|
||||
function scrollevent() {
|
||||
$('.tl-box').scroll(function() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//設定(setting.html)で読む
|
||||
var envView = new Vue({
|
||||
el: "#envView",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//ソートデータ読み込み
|
||||
function sortLoad () {
|
||||
$("#sort").html("");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
function spotifyConnect() {
|
||||
var auth = "https://accounts.spotify.com/authorize?client_id=0f18e54abe0b4aedb4591e353d3aff69&redirect_uri=https://thedesk.top/spotify-connect&response_type=code&scope=user-read-currently-playing";
|
||||
var platform = localStorage.getItem("platform");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//テーマ適用
|
||||
function themes(theme) {
|
||||
if (!theme) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//左下のメッセージ
|
||||
var todcTrigger = null
|
||||
function todo(mes) {
|
||||
|
@ -128,7 +129,7 @@ function trendTagonTip() {
|
|||
})
|
||||
}
|
||||
//Spotify
|
||||
spotint = null
|
||||
var spotint = null
|
||||
function spotifytips() {
|
||||
if (spotint) clearInterval(spotint)
|
||||
var start =
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//ユーザーデータ表示
|
||||
//タイムライン
|
||||
function utl(user, more, acct_id) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//プロフ編集
|
||||
//文字系
|
||||
function profedit() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict'
|
||||
//ユーザーデータ表示
|
||||
localStorage.removeItem("history");
|
||||
//コード受信
|
||||
|
|
Loading…
Reference in New Issue
Block a user