Add: lang

This commit is contained in:
cutls 2020-02-08 23:48:31 +09:00
parent 72daf55e4e
commit 5d9327d3d3
8 changed files with 34 additions and 1 deletions

View File

@ -317,6 +317,7 @@ function srcBox(mode) {
} else if (mode == 'close') {
if(!selectedText) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
}
} else {
$('#pageSrc').toggleClass('hide')
@ -340,9 +341,16 @@ document.addEventListener('selectionchange', function() {
}
})
function doSrc(type) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
var q = $('#pageSrcInput').val()
if(type == 'web') {
postMessage(["openUrl", 'https://google.com/search?q=' + q], "*")
var start = localStorage.getItem('srcUrl')
if(!start) {
start = 'https://google.com/search?q={q}'
}
start = start.replace(/{q}/, q)
postMessage(["openUrl", start], "*")
} else if(type == 'ts') {
tsAdd(q)
}

View File

@ -1,6 +1,8 @@
{
"draghere":"Drag here to upload",
"close":"Close",
"webSrc": "Search on Web",
"tsSrc": "Search on tootsearch",
"showSelectProf":"Show profile of the selecting account",
"closethisbox":"Close this box",
"toot":"Toot",

View File

@ -35,6 +35,8 @@
"useragent":"User agent",
"useragentWarn":"Restart when changed",
"absolute": "absolute value",
"srcUrl": "Search engine",
"srcUrlWarn": "{q} will be replaced to query.",
"themeSel": "Select theme",
"customtheme": "Edit and add custom themes",
"customthemeDirection": "Color scheme",

View File

@ -1,6 +1,8 @@
{
"draghere":"ドラッグしてみ?(ドラッグしたらすぐアップロードされるで)",
"close":"Close",
"webSrc": "Webでさがす",
"tsSrc": "tootsearchでさがす",
"showSelectProf":"このアカウントのプロフィール出す",
"closethisbox":"このボックスなおす",
"post-new":"投稿",

View File

@ -34,6 +34,8 @@
"useragent":"ユーザーエージェント",
"useragentWarn":"再起動すんで。",
"absolute": "絶対指定",
"srcUrl": "検索エンジン",
"srcUrlWarn": "{q}が検索文字列になるで。",
"themeSel": "テーマの選択",
"customtheme": "カスタムテーマの作成・編集",
"customthemeDirection": "色の系統",

View File

@ -1,5 +1,7 @@
{
"draghere":"ここにドラッグして添付(ドラッグと同時にアップロードされます)",
"webSrc": "Webで検索",
"tsSrc": "tootsearchで検索",
"close":"Close",
"showSelectProf":"選択したアカウントのプロフィールを表示",
"closethisbox":"このボックスを閉じる",

View File

@ -35,6 +35,8 @@
"useragent":"ユーザーエージェント",
"useragentWarn":"再起動します。",
"absolute": "絶対指定",
"srcUrl": "検索エンジン",
"srcUrlWarn": "{q}が検索文字列に置換されます。",
"themeSel": "テーマの選択",
"customtheme": "カスタムテーマの作成・編集",
"customthemeDirection": "色の系統",

View File

@ -129,6 +129,19 @@ var envConstruction = [
head: '@@useragent@@',
desc: '@@useragentWarn@@'
}
},
{
id: 'srcUrl',
storage: 'srcUrl',
checkbox: false,
doubleText: false,
width: 200,
setValue: 'https://google.com/search?q={q}',
text: {
head: '@@srcUrl@@',
desc: '@@srcUrlWarn@@',
after: ''
}
}
]
var tlConstruction = [