User:Bluedeck/serve/ar-auto.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// Automatic AR Request issuer and result fetcher
// CC-BY-SA
// Author: Bluedeck <bluedeck@outlook.com> at zh.Wikipedia
(function(){
(function(ele, txt, time, condition){
if(!condition) return;
ele.innerHTML = "";
(function(ele, txt, time){
txt = txt.split("");
var len = txt.length, rate = time/len;
for(var i=0; i<len; i++) setTimeout(function(){ele.innerHTML += txt.shift();}, i*rate);
})(ele, txt, time);
})(document.getElementById("ar_auto"), "2021.0.2", 400, document.getElementById("8c23b4144bd58c689e192c6ab912a3b75c76f6849977518b8bedefd5e347d67f"));
})();
var bluedeck_scope_container = {
"issueRequestPerPageName":function(pagename)
{
var moreRequestsText = document.getElementById("bluedeck_dom_object_input1").value;
bluedeck_scope_container.editAppend("Wikipedia:已删除内容查询",bluedeck_scope_container.get.requestContent(mw.config.values.wgPageName,moreRequestsText),bluedeck_scope_container.intl.new_article_rescue_item[bluedeck_scope_container.db.langcode]+mw.config.values.wgPageName,bluedeck_scope_container.takeToken());
},
"issueRequestThroughButton":function()
{
bluedeck_scope_container.issueRequestPerPageName(mw.config.values.wgPageName);
document.getElementById("bluedeck_dom_object_button_submit").disabled=true;
document.getElementById("bluedeck_dom_object_button_cancel").disabled=true;
document.getElementById("bluedeck_dom_object_input1").disabled=true;
document.getElementById("bluedeck_dom_object_button_submit").innerHTML=bluedeck_scope_container.intl.submitting[bluedeck_scope_container.db.langcode];
bluedeck_scope_container.ding(bluedeck_scope_container.intl.article_rescue_request_is_being_submitted[bluedeck_scope_container.db.langcode])
},
"fetchHistoryRecordValueOnce":function()
{
var f=function()
{
if(this.readyState===4)
{
bluedeck_scope_container.db.historyValue = this.responseText;
bluedeck_scope_container.historyValueReady = true;
bluedeck_scope_container.interpretHistoryValue();
}
};
bluedeck_scope_container.getPage("user:"+mw.config.values.wgUserName+"/etc/ar-cloud-database.js",f);
},
"interpretHistoryValue":function()
{
if(bluedeck_scope_container.tellPageExist(bluedeck_scope_container.db.historyValue))
{
var historyParenFix = new bluedeck_scope_container.parenfix();
}
else
{
// ask if the user would like to enable this feature.
// page should look like (enabled:true/false)(clearanceIssued:true/false)(json)[["statcode","pagename"],["statcode","pagename"]] over time.
bluedeck_scope_container.initQuest = true;
if(bluedeck_scope_container.db.windowContentHasBeenInitiated && !bluedeck_scope_container.initQuestIgnored)
{
getElementById("bluedeck_dom_object_ar_histroy_init_quest").style.display = "block";
}
}
},
"historyValueReady":false,
"initQuest":false,
"initQuestIgnored":false,
"ignoreInitQuest":function()
{
getElementById("bluedeck_dom_object_ar_histroy_init_quest").style.display = none;
bluedeck_scope_container.initQuestIgnored = true;
},
"remindUnreadItem":function()
{
bluedeck_scope_container.remindUnreadItem_outerReminderInitilizer();
},
"remindUnreadItem_outerReminderInitilizer":function()
{
for(var i=0;i<40;i++)
{
setTimeout('document.getElementById("p-cactions-label").childNodes[0].style.color = bluedeck_scope_container.db.outerRemindingColorString;',i*1500);
setTimeout('document.getElementById("bluedeck_dom_object_trigger_of_ar:a_text").style.color = bluedeck_scope_container.db.outerRemindingColorString;',i*1500);
}
for(i=0;i<40;i++) // 40 steps * 1500 ms per step makes sure the reminder twinkles at most 1 minute in any circumstance.
{
setTimeout('document.getElementById("p-cactions-label").childNodes[0].style.color = "";',i*1500+750);
setTimeout('document.getElementById("bluedeck_dom_object_trigger_of_ar:a_text").style.color = "";',i*1500+750);
}
},
"remindUnreadItem_outerReminderTerminator":function()
{
bluedeck_scope_container.db.outerRemindingColorString = "";
},
"unremind":function()
{
bluedeck_scope_container.remindUnreadItem_outerReminderTerminator();
},
"killInterface":function()
{
document.getElementById("bluedeck_dom_object_window").style.display="none";
document.getElementById("bluedeck_dom_object_screen").style.display="none";
},
"showWindow":function(content)
{
bluedeck_scope_container.killInterface();
document.getElementById("bluedeck_dom_object_screen").style.display="block";
document.getElementById("bluedeck_dom_object_window").style.display="block";
document.getElementById("bluedeck_dom_object_window").style.top=(50+document.body.scrollTop)+"px";
if(bluedeck_scope_container.db.windowContentHasBeenInitiated === false)
{
document.getElementById("bluedeck_dom_object_window").innerHTML=content;
bluedeck_scope_container.db.windowContentHasBeenInitiated = true;
}
bluedeck_scope_container.unremind();
// bluedeck_scope_container.interpretHistoryValue();
if(bluedeck_scope_container.initQuest === true && !bluedeck_scope_container.initQuestIgnored)
{
getElementById("bluedeck_dom_object_ar_histroy_init_quest").style.display = "block";
}
},
"startInterface":function()
{
bluedeck_scope_container.showWindow(bluedeck_scope_container.get.interfaceContent());
bluedeck_dom_object_pagename.innerHTML=bluedeck_scope_container.filtKeywordsHTML(mw.config.values.wgPageName);
},
"insertInterfaceElements":function(lang_code)
{
// the starting point of the whole service
if(lang_code)
{
bluedeck_scope_container.db.langcode = lang_code;
}
var bluedeck_ar = mw.util.addPortletLink(
"p-cactions",
'javascript:void null',
bluedeck_scope_container.intl.ar[bluedeck_scope_container.db.langcode],
'bluedeck_dom_object_trigger_of_ar'
);
$(bluedeck_ar).click(function(_event) {
bluedeck_scope_container.startInterface();
});
document.getElementsByTagName("body")[0].insertAdjacentHTML("afterbegin","<div id='bluedeck_dom_object_window'></div><div id='bluedeck_dom_object_screen' onclick='bluedeck_scope_container.killInterface()'></div>");
for(var x in bluedeck_scope_container.db.u5){document.getElementById("bluedeck_dom_object_screen").style[x]=bluedeck_scope_container.db.u5[x];};
for(var x in bluedeck_scope_container.db.u6){document.getElementById("bluedeck_dom_object_window").style[x]=bluedeck_scope_container.db.u6[x];};
// bluedeck_scope_container.fetchHistoryRecordValueOnce();
},
"ding":function(content)
{
document.getElementById("bluedeck_dom_object_ar_info_window").style.display = "block";
document.getElementById("bluedeck_dom_object_ar_info_window").innerHTML = content;
},
"filtKeywordsHTML":function(html)
{
return html.split("&").join("&").split("<").join("<");
},
"asyncPost":function(url,body,fn)
{
var z1="Content-Type";
var z2="application/x-www-form-urlencoded";
var a=new XMLHttpRequest();
a.onreadystatechange=fn;
a.open("POST",url,true);
a.setRequestHeader(z1,z2);
a.send(body);
},
"edit":function(a,b,c,d,f)
{
if(!f)
{
var f=function(){}; // f is definable.
}
if(!d)
{
var d=bluedeck_scope_container.takeToken();
}
var z="action=edit&minor=1&bot=1&format=json&title=";
bluedeck_scope_container.asyncPost("https://zh.wikipedia.org/w/api.php",z+encodeURIComponent(a)+"&text="+encodeURIComponent(b)+"&summary="+encodeURIComponent(c)+"&token="+encodeURIComponent(d),f);
},
"getPage":function(a,fn)
{
var z="action=query&prop=revisions&rvprop=ids|flags|timestamp|user|userid|size|comment|tags|content&format=json&titles=";
bluedeck_scope_container.asyncPost("https://zh.wikipedia.org/w/api.php",z+encodeURIComponent(a),fn);
},
"editAppend":function(a,b,c,d)
{
var f2=function()
{
if(this.readyState===4)
{
document.getElementById("bluedeck_dom_object_button_submit").innerHTML=bluedeck_scope_container.intl.submitted[bluedeck_scope_container.db.langcode];
bluedeck_scope_container.ding("<span style='color:#4b4'>"+bluedeck_scope_container.intl.article_rescue_request_has_been_submitted_please_wait_for_reply[bluedeck_scope_container.db.langcode]+"</span>");
}
};
var f=function()
{
if(this.readyState===4)
{
bluedeck_scope_container.edit(a,bluedeck_scope_container.pickPageContent(this.responseText)+""+b,c,d,f2);
}
};
bluedeck_scope_container.getPage(a,f);
},
"tellPageExist":function(a)
{
if(typeof a==="string")
{
var b=JSON.parse(a);
if(typeof b==="object")
{
if(b.query.pages["-1"])
{
return true;
}
else
{
return false;
}
}
}
else // tellPage functions will only work with string inputs. DO NOT parse pages before passing them into tellPage functions.
{
return false;
}
},
"pickPageContent":function(a)
{
if(typeof a==="string")
{
var b=JSON.parse(a);
if(typeof b==="object")
{
for(var x in b.query.pages)
{
var c=b.query.pages[x];
return c.revisions[0]["*"];
}
}
else
{
return false;
}
}
else
{
return false;
}
},
"loadTokenInSilence":function()
{
bluedeck_scope_container.asyncPost("https://zh.wikipedia.org/w/api.php","action=query&meta=tokens&format=json",function()
{
if(this.readyState === 4 && this.status === 200)
{
try {
bluedeck_scope_container.db.token=JSON.parse(this.responseText).query.tokens.csrftoken;
} catch(e) {
// SyntaxError: JSON Parse error: Unexpected EOF
}
}
});
setTimeout("bluedeck_scope_container.loadTokenInSilence()",1800000);
},
"takeToken":function()
{
return bluedeck_scope_container.db.token;
},
"init":function()
{
setTimeout(bluedeck_scope_container.insertInterfaceElements, 600);
bluedeck_scope_container.loadTokenInSilence();
},
"get":{
"interfaceContent":function()
{
return [
'<div class="dialogue-wrap" style="position: relative; margin: 2em 0em; padding: 0; border: 0.7px solid rgba(0,0,0,0.3); background-color: rgba(255,255,255,1); box-shadow: 0 14px 18px rgba(0,0,0,0.52); border-radius: 0.3em; overflow: hidden; "><div class="dialogue-head" style="position: relative; height: 1.8em; border-bottom:0.7px solid rgba(187,187,187,1); text-align:center; background: linear-gradient(to top, rgba(0,0,0,0.09), rgba(0,0,0,0.06)); color: rgba(0,0,0,0.7);"><span style="position: relative; font-size: 0.8em; line-height: 1.8em; cursor: default;">'+bluedeck_scope_container.intl.submit_this_page_for_article_rescue[bluedeck_scope_container.db.langcode]+'</span><div class="dialogue-head-window-options" style="position: absolute; top: 0.6em; left: 0.6em; height: 0.6em; width: 0.6em; border-radius: 100%; float: left; background: rgba(255,88,77,1); border: 0.5px solid rgba(235,78,67,1);"></div><div class="dialogue-head-window-options" style="position: absolute; top: 0.6em; left: 1.67em; height: 0.6em; width: 0.6em; border-radius: 100%; float: left; background: rgba(255,197,40,1); border: 0.5px solid rgba(235,177,34,1);"></div><div class="dialogue-head-window-options" style="position: absolute; top: 0.6em; left: 2.74em; height: 0.6em; width: 0.6em; border-radius: 100%; float: left; background: rgba(82,210,75,1); border: 0.5px solid rgba(70,200,65,1);"></div></div>',
'<div style="padding:20px 40px; background:rgba(0,0,0,0.05)"><table style="width:100%">',
'<tr><td style="white-space:nowrap;width:1px; text-align: right;">'+bluedeck_scope_container.intl.page_name[bluedeck_scope_container.db.langcode]+'</td><td><span id="bluedeck_dom_object_pagename"></span></td></tr>',
'<tr><td style="white-space:nowrap;width:1px; text-align: right;">'+bluedeck_scope_container.intl.special_request_message[bluedeck_scope_container.db.langcode]+'</td><td><input id="bluedeck_dom_object_input1" type="text" placeholder="'+bluedeck_scope_container.intl.optional[bluedeck_scope_container.db.langcode]+'" style="width:100%"></input></td></tr>',
'<tr><td style="white-space:nowrap;width:1px; text-align: right;">'+bluedeck_scope_container.intl.submition[bluedeck_scope_container.db.langcode]+'</td><td><button id="bluedeck_dom_object_button_submit" onclick="bluedeck_scope_container.issueRequestThroughButton()">'+bluedeck_scope_container.intl.submit_now[bluedeck_scope_container.db.langcode]+'</button> <button id="bluedeck_dom_object_button_cancel" onclick="bluedeck_scope_container.killInterface()">'+bluedeck_scope_container.intl.cancel[bluedeck_scope_container.db.langcode]+'</button></td></tr>',
'</table>',
'<div id="bluedeck_dom_object_ar_info_window" style="display:none;padding:10px;margin-top:10px;background:#eee;font-size:80%;"></div>',
'<div id="bluedeck_dom_object_ar_histroy_init_quest" style="display:none;margin-top:10px;"><div>'+bluedeck_scope_container.intl.do_you_want_to_enable_article_rescue_result_auto_feedback_feature[bluedeck_scope_container.db.langcode]+'</div><div style="text-align:right"><button>'+bluedeck_scope_container.intl.yes[bluedeck_scope_container.db.langcode]+'</button> <button>'+bluedeck_scope_container.intl.no[bluedeck_scope_container.db.langcode]+'</button> <button onclick="window.open(\'https://zh.wikipedia.org/wiki/user:bluedeck/haystack/ar-auto#62572381709c6e50e4d3ebb986115354813ddaf4bc2b85d32a9c3be82a4651c2\')">'+bluedeck_scope_container.intl.more_detail[bluedeck_scope_container.db.langcode]+'</button></div></div>',
'<div id="bluedeck_dom_object_ar_histroy_window" style="display:none;margin-top:10px;"></div>',
'</div>',
'</div>'
].join("");
},
"requestContent":function(pagename,more)
{
return "\n\n{{subst:ARNAP\n|s=new\n|hidden=\n|rev=\n|arc=\n|auto="+mw.config.values.wgUserName+"\n|page="+pagename+"\n|more="+more+"\n|sig=~~"+"~~}}";
}
},
"db":{
"u5":{"position":"fixed","height":"100%","width":"100%","background":"#fff","opacity":"0.48","z-index":"10000","display":"none",},// style of screen
"u6":{"position":"absolute","height":"0","width":"65%","min-width":"220px","max-width":"600px","min-height":"0","left":"0","right":"0","margin":"auto","word-wrap":"break-word","background":"#fff","z-index":"10001","display":"none",},// style of window
"windowContentHasBeenInitiated":false,
"token":false,
"langcode":"",
"outerRemindingColorString":"transparent",
"historyValue":"",
},
"intl":{
"new_article_rescue_item":{
"en_us":"New Article Rescue Item: ",
"en_uk":"New Article Rescue Item: ",
"fr_fr":"Nouvelle requête de Article Rescue: ",
"fr_ca":"Nouvelle requête de Article Rescue: ",
"ja_jp":"新規削除検索依頼:",
"kr_kr":"새로운 삭제 된 내용의 검색 의뢰: ",
"se_sw":"Ny artikel räddning post: ",
"zh_cn":"新增的已删除查询项目:",
"zh_hk":"新增的已刪除查詢項目:",
"zh_tw":"新增的已刪除查詢項目:",
},
"ar":{
"en_us":"AR",
"en_uk":"AR",
"fr_fr":"AR",
"fr_ca":"AR",
"ja_jp":"削除検索",
"kr_kr":"삭제 검색",
"se_sw":"AR",
"zh_cn":"已删查询",
"zh_hk":"已刪查詢",
"zh_tw":"已刪查詢",
},
"optional":{
"en_us":"optional",
"en_uk":"optional",
"fr_fr":"optionnel",
"fr_ca":"optionnel",
"ja_jp":"空白のままにしてもいい",
"kr_kr":"이대로도 좋다",
"se_sw":"frivillig",
"zh_cn":"可选填",
"zh_hk":"可選填",
"zh_tw":"可選填",
},
"submitting":{
"en_us":"Submitting...",
"en_uk":"Submitting...",
"fr_fr":"Soumission en cours...",
"fr_ca":"Soumission en cours...",
"ja_jp":"提出してます...",
"kr_kr":"제출하고 있습니다 ...",
"se_sw":"Att skicka in...",
"zh_cn":"提交中...",
"zh_hk":"提交中...",
"zh_tw":"提交中...",
},
"submitted":{
"en_us":"Submitted",
"en_uk":"Submitted",
"fr_fr":"Soumis",
"fr_ca":"Soumis",
"ja_jp":"提出しました",
"kr_kr":"제출했습니다",
"se_sw":"Skickat",
"zh_cn":"已提交",
"zh_hk":"已提交",
"zh_tw":"已提交",
},
"submition":{
"en_us":"Submission: ",
"en_uk":"Submission: ",
"fr_fr":"Soumission: ",
"fr_ca":"Soumission: ",
"ja_jp":"提出:",
"kr_kr":"제출: ",
"se_sw":"Underkastelse: ",
"zh_cn":"提交:",
"zh_hk":"提交:",
"zh_tw":"提交:",
},
"submit_now":{
"en_us":"Submit now",
"en_uk":"Submit now",
"fr_fr":"Soumettez dès maintenant",
"fr_ca":"Soumettez dès maintenant",
"ja_jp":"すぐに提出する",
"kr_kr":"즉시 제출",
"se_sw":"Skicka nu",
"zh_cn":"立刻提交",
"zh_hk":"立刻提交",
"zh_tw":"立刻提交",
},
"cancel":{
"en_us":"Cancel",
"en_uk":"Cancel",
"fr_fr":"Annuler",
"fr_ca":"Annuler",
"ja_jp":"キャンセル",
"kr_kr":"취소",
"se_sw":"Avbryt",
"zh_cn":"取消",
"zh_hk":"取消",
"zh_tw":"取消",
},
"article_rescue_request_is_being_submitted":{
"en_us":"Article Rescue request is being submitted...",
"en_uk":"Article Rescue request is being submitted...",
"fr_fr":"Requête de Article Rescue est soumise...",
"fr_ca":"Requête de Article Rescue est soumise...",
"ja_jp":"削除された内容検索依頼を提出してます...",
"kr_kr":"삭제 된 내용의 검색 요청을 제출합니다 ...",
"se_sw":"Artikel räddnings begäran skickas...",
"zh_cn":"正在提交页面查询...",
"zh_hk":"正在提交頁面查詢...",
"zh_tw":"正在提交頁面查詢...",
},
"article_rescue_request_has_been_submitted_please_wait_for_reply":{
"en_us":"The request has been submitted, please wait for reply. Click outside the dialog to return to page.",
"en_uk":"The request has been submitted, please wait for reply. Click outside the dialog to return to page.",
"fr_fr":"La demande a été soumise, attendez la réponse s.v.p. Pour revenir, cliquez en dehors de la boîte de dialogue.",
"fr_ca":"La demande a été soumise, attendez la réponse s.v.p. Pour revenir, cliquez en dehors de la boîte de dialogue.",
"ja_jp":"依頼が提出されました、処理するまでしばらくお待ちください。空白のスペースをクリックするとページに戻る。",
"kr_kr":"요청이 제출되었습니다 답장을 기다리십시오. 빈 공간을 클릭하면 페이지로 돌아갑니다.",
"se_sw":"Begäran har skickats, vänta på svar. Klicka utanför dialogrutan för att återgå till sidan.",
"zh_cn":"请求已经发送,请等候回复。点击空白处即可返回页面。",
"zh_hk":"請求已經發送,請等候回覆。點擊空白處即可返回頁面。",
"zh_tw":"請求已經發送,請等候回覆。點擊空白處即可返回頁面。",
},
"submit_this_page_for_article_rescue":{
"en_us":"Article Rescue",
"en_uk":"Article Rescue",
"fr_fr":"Article Rescue",
"fr_ca":"Article Rescue",
"ja_jp":"削除された内容検索依頼",
"kr_kr":"이 페이지를 삭제 된 내용의 검색 요청에 제출한다",
"se_sw":"Artikeln räddning.",
"zh_cn":"已删内容查询",
"zh_hk":"已刪內容查詢",
"zh_tw":"已刪內容查詢",
},
"article_rescue":{
"en_us":"Article Rescue",
"en_uk":"Article Rescue",
"fr_fr":"Article Rescue",
"fr_ca":"Article Rescue",
"ja_jp":"削除された内容を検索",
"kr_kr":"삭제 된 내용의 검색",
"se_sw":"Artikeln Rescue",
"zh_cn":"已删内容查询",
"zh_hk":"已刪內容查詢",
"zh_tw":"已刪內容查詢",
},
"page_name":{
"en_us":"Page name: ",
"en_uk":"Page name: ",
"fr_fr":"Nomme de la page: ",
"fr_ca":"Nomme de la page: ",
"ja_jp":"ページ名:",
"kr_kr":"페이지 이름: ",
"se_sw":"Sida namn:",
"zh_cn":"页面名称:",
"zh_hk":"頁面名稱:",
"zh_tw":"頁面名稱:",
},
"special_request_message":{
"en_us":"Special request or message: ",
"en_uk":"Special request or message: ",
"fr_fr":"Demande spéciale ou message: ",
"fr_ca":"Demande spéciale ou message: ",
"ja_jp":"特別な要求またはメッセージ:",
"kr_kr":"특별한 요구 또는 메시지: ",
"se_sw":"Särskild begäran eller meddelande: ",
"zh_cn":"特殊要求或留言:",
"zh_hk":"特殊要求或留言:",
"zh_tw":"特殊要求或留言:",
},
"article_rescue_history":
{
"en_us":"Article Rescue History",
"en_uk":"Article Rescue History",
"fr_fr":"Histoire d'Article Rescue",
"fr_ca":"Histoire d'Article Rescue",
"ja_jp":"削除された検索の記録",
"kr_kr":"삭제 된 검색 기록",
"se_sw":"Artikel Rescue Historia",
"zh_cn":"已删查询记录",
"zh_hk":"已刪查詢記錄",
"zh_tw":"已刪查詢記錄",
},
"delete":
{
"en_us":"Delete",
"en_uk":"Delete",
"fr_fr":"Supprimer",
"fr_ca":"Supprimer",
"ja_jp":"削除する",
"kr_kr":"삭제하기",
"se_sw":"Radera",
"zh_cn":"删除",
"zh_hk":"刪除",
"zh_tw":"刪除",
},
"mark_as_read":
{
"en_us":"Mark as read",
"en_uk":"Mark as read",
"fr_fr":"Marquer comme lu",
"fr_ca":"Marquer comme lu",
"ja_jp":"開封済みに",
"kr_kr":"읽은 상태로 표시",
"se_sw":"Markera som läst",
"zh_cn":"已阅",
"zh_hk":"已閱",
"zh_tw":"已閱",
},
"mark_all_as_read":
{
"en_us":"Mark all as read",
"en_uk":"Mark all as read",
"fr_fr":"Marquer tous comme lu",
"fr_ca":"Marquer tous comme lu",
"ja_jp":"全部開封済みに",
"kr_kr":"모두 읽은 상태로 표시",
"se_sw":"Markera allt som läst",
"zh_cn":"全部已阅",
"zh_hk":"全部已閱",
"zh_tw":"全部已閱",
},
"mark_all_as_unread":
{
"en_us":"Mark all as unread",
"en_uk":"Mark all as unread",
"fr_fr":"Marquer tous comme non lu",
"fr_ca":"Marquer tous comme non lu",
"ja_jp":"全部未開封に",
"kr_kr":"모두 미개봉에",
"se_sw":"Markera allt som oläst",
"zh_cn":"全部未读",
"zh_hk":"全部未讀",
"zh_tw":"全部未讀",
},
"mark_as_unread":
{
"en_us":"Mark as unread",
"en_uk":"Mark as unread",
"fr_fr":"Marquer comme non lu",
"fr_ca":"Marquer comme non lu",
"ja_jp":"未開封に",
"kr_kr":"미개봉에",
"se_sw":"Markera som oläst",
"zh_cn":"未读",
"zh_hk":"未讀",
"zh_tw":"未讀",
},
"show_all_hisory":
{
"en_us":"Show all history",
"en_uk":"Show all history",
"fr_fr":"Afficher tout l'historique",
"fr_ca":"Afficher tout l'historique",
"ja_jp":"全て表示する",
"kr_kr":"모두보기",
"se_sw":"Visa hela historien",
"zh_cn":"显示全部记录",
"zh_hk":"顯示全部記錄",
"zh_tw":"顯示全部記錄",
},
"do_you_want_to_enable_article_rescue_result_auto_feedback_feature":
{
"en_us":"There's a new feature called Automatic AR Result Report. Do you want to enable it?",
"en_uk":"There's a new feature called Automatic AR Result Report. Do you want to enable it?",
"fr_fr":"Il y a une nouvelle fonctionnalité appelée automatique AR Rapport de résultat. Voulez-vous l'activer?",
"fr_ca":"Il y a une nouvelle fonctionnalité appelée automatique AR Rapport de résultat. Voulez-vous l'activer?",
"ja_jp":"削除された内容検索結果を自動的に報告するという新しい機能が利用できます。有効にしますか?",
"kr_kr":"삭제 된 내용 검색 결과를 자동으로보고하는 새로운 기능을 사용할 수 있습니다. 사용 하시겠습니까?",
"se_sw":"Det finns en ny funktion som kallas automatisk AR resultatrapport. Vill du göra det?",
"zh_cn":"现在,您可以选择让已删除内容的查询结果自动出现在这里。您希望启用这个功能吗?",
"zh_hk":"現在,您可以選擇讓已刪除內容的查詢結果自動出現在這裡。您希望啟用這個功能嗎?",
"zh_tw":"現在,您可以選擇讓已刪除內容的查詢結果自動出現在這裡。您希望啟用這個功能嗎?",
},
"yes":
{
"en_us":"yes",
"en_uk":"yes",
"fr_fr":"oui",
"fr_ca":"oui",
"ja_jp":"はい",
"kr_kr":"예",
"se_sw":"ja",
"zh_cn":"好的",
"zh_hk":"好的",
"zh_tw":"好的",
},
"no":
{
"en_us":"no",
"en_uk":"no",
"fr_fr":"non",
"fr_ca":"non",
"ja_jp":"いいえ",
"kr_kr":"아니오",
"se_sw":"naj",
"zh_cn":"不要",
"zh_hk":"不要",
"zh_tw":"不要",
},
"hide":
{
"en_us":"hide",
"en_uk":"hide",
"fr_fr":"cacher",
"fr_ca":"cacher",
"ja_jp":"非表示にする",
"kr_kr":"숨기기",
"se_sw":"dölja",
"zh_cn":"隐藏",
"zh_hk":"隱藏",
"zh_tw":"隱藏",
},
"more_detail":
{
"en_us":"more detail",
"en_uk":"more detail",
"fr_fr":"plus de détails",
"fr_ca":"plus de détails",
"ja_jp":"更に詳しく",
"kr_kr":"더욱 상세",
"se_sw":"mer detaljer",
"zh_cn":"详细了解",
"zh_hk":"詳細了解",
"zh_tw":"詳細了解",
},
"please_hold_on":
{
"en_us":"please hold on...",
"en_uk":"please hold on...",
"fr_fr":"en cours...",
"fr_ca":"en cours...",
"ja_jp":"しばらくお待ちください...",
"kr_kr":"잠시 기다려주십시오 ...",
"se_sw":"var god vänta...",
"zh_cn":"请稍等...",
"zh_hk":"請稍等...",
"zh_tw":"請稍等...",
},
"successfully_enabled_automatic_report":
{
"en_us":"Automatic report has been successfully enabled. New AR results will show up here in the future.",
"en_uk":"Automatic report has been successfully enabled. New AR results will show up here in the future.",
"fr_fr":"Rapport automatique a été activé avec succès. De nouveaux résultats AR apparaîtront ici à l'avenir.",
"fr_ca":"Rapport automatique a été activé avec succès. De nouveaux résultats AR apparaîtront ici à l'avenir.",
"ja_jp":"いまから自動報告機能が有効にされています。検索結果が出すとき、ここに表示されます。",
"kr_kr":"지금부터 자동보고 기능이 활성화되어 있습니다. 검색 결과가 낼 때 여기에 표시됩니다.",
"se_sw":"Automatisk rapport har framgångsrikt aktiverats. Nya AR resultat kommer att dyka upp här i framtiden.",
"zh_cn":"自动报告功能已经启用。今后,已删内容的查询结果将自动在这里显示。",
"zh_hk":"自動報告功能已經啟用。今後,已刪內容的查詢結果將自動在這裡顯示。",
"zh_tw":"自動報告功能已經啟用。今後,已刪內容的查詢結果將自動在這裡顯示。",
},
"this_message_will_not_show_up_again":
{
"en_us":"Automatic report has been disabled. This message will not show up again. You can still access settings via \"preferences\" at any point in the future.",
"en_uk":"Automatic report has been disabled. This message will not show up again. You can still access settings via \"preferences\" at any point in the future.",
"fr_fr":"Rapport automatique a été désactivé. Ce message ne sera pas affiché à nouveau. Vous pouvez accéder aux paramètres via les «préférences» à tout moment.",
"fr_ca":"Rapport automatique a été désactivé. Ce message ne sera pas affiché à nouveau. Vous pouvez accéder aux paramètres via les «préférences» à tout moment.",
"ja_jp":"さっきから自動報告機能が無効にされている。でも、「設定」では個人設定をアクセスすることはいつまでもできます。",
"kr_kr":"아까부터 자동보고 기능이 비활성화되어있다. 하지만 \"설정\"개인 설정을 액세스 할 언제 까지나 할 수 있습니다.",
"se_sw":"Automatisk rapport har inaktiverats. Detta meddelande kommer inte att dyka upp igen. Du kan fortfarande komma åt inställningarna via \"inställningar\" vid något tillfälle i framtiden.",
"zh_cn":"自动报告功能已经停用。本消息将不会再次出现。但是,您可随时在“设置”中访问您的个人设置。",
"zh_hk":"自動報告功能已經停用。本消息將不會再次出現。但是,您可隨時在“設置”中訪問您的個人設置。",
"zh_tw":"自動報告功能已經停用。本消息將不會再次出現。但是,您可隨時在“設置”中訪問您的個人設置。",
},
},
"intl_machine":{
"en_us":"",
"en_uk":"en_us",
"fr_fr":"",
"fr_ca":"fr_fr",
"ja_jp":"",
"kr_kr":"ja_jp",
"se_sw":"en_us",
"zh_cn":"",
"zh_hk":"zh_cn",
"zh_tw":"zh_cn",
},
"parenfix":function()
{
this.data={"brief":{},"label":"","raw":""};
this.setParendata = function(parendata)
{
if(this.check_validity_parendata(parendata))
{
this.data = this.parendata_to_json(parendata);
return true;
}
return false;
};
this.getParendata = function()
{
return this.json_to_parendata(this.data);
};
this.setJson = function(json)
{
if(this.check_validity_json(json))
{
this.data = json;
return true;
}
return false;
};
this.getJson = function()
{
return this.data;
};
this.parendata_to_json = function(string)
{
arr = string.split(")");
brief = {};
label = "";
raw = "";
for(i=0; i<arr.length; i++)
{
if(arr[i].split(":").length !== 2)
{
label = arr[i].split("(")[1];
break;
}
}
for(j=0; j<i; j++)
{
brief[arr[j].split(":")[0].split("(")[1]] = arr[j].split(":")[1];
}
brr=[];
for(i++; i<arr.length; i++)
{
brr = brr.concat(arr[i]);
}
raw = brr.join(")");
return {"brief":brief,"label":label,"raw":raw};
};
this.json_to_parendata = function(json)
{
parendata = "";
for(i in json.brief)
{
parendata += "(" + i + ":" + json.brief[i] + ")";
}
parendata += "(" + json.label + ")";
parendata += json.raw;
return parendata;
};
this.check_validity_parendata = function(string)
{
if(string.length<2)
{
// string has to contain at least "()".
return false;
}
if(string.length===2&&string!=="()")
{
// string has to be "()" if it has a length of 2
return false;
}
arr = string.split(")");
for(i=0; i<arr.length; i++)
{
if(arr[i].split(":").length >2)
{
// more than 1 colon in each pair of parentheses is not allowed.
return false;
}
if(arr[i][0] !== "(")
{
// has to have left parenthesis
return false;
}
if(arr[i].split(":").length === 1)
{
// has to have a label
break;
}
}
return true;
};
this.check_validity_json = function(json)
{
if(typeof json.brief !== "object")
{
// json.brief has to be object
return false;
}
if(typeof json.label !== "string")
{
// json.label has to be string
return false;
}
if(json.label.split(":").length !== 1)
{
// does not allow ":" in label
return false;
}
if(json.label.split("(").length !== 1)
{
// does not allow "(" in label
return false;
}
if(json.label.split(")").length !== 1)
{
// does not allow ")" in label
return false;
}
if(typeof json.raw !== "string")
{
// json.raw has to be string
return false;
}
for(var i in json.brief)
{
if(i.split("(").length !== 1)
{
// does not allow "(" in cell key
return false;
}
if(i.split(")").length !== 1)
{
// does not allow ")" in cell key
return false;
}
if(i.split(":").length !== 1)
{
// does not allow ":" in cell key
return false;
}
if(typeof json.brief[i] !== "string")
{
// each cell of brief has to be string
return false;
}
if(json.brief[i].split("(").length !== 1)
{
//does not allow "(" in cell data
return false;
}
if(json.brief[i].split(")").length !== 1)
{
//does not allow ")" in cell data
return false;
}
if(json.brief[i].split(":").length !== 1)
{
//does not allow ":" in cell data
return false;
}
}
return true;
};
},
"ready":true,
};