一键生成非主流倒立英文句子

今天打开网易日推,看到有这样的评论:

🙃¡ǝɹɐ noʎ oɥʍ ʍouʞ uɐɔ I os uoʇʇnq ǝɥʇ ʞɔı̣lɔ uɐɔ noʎ 'ƃuǝʇuɐpǝpuɐı̣x lǝǝɟ oslɐ noʎ ʇɐɥʇ suɐǝɯ ǝƃɐssɐd sı̣ɥʇ pɐǝɹ uɐɔ noʎ ɟı̣ 'ǝƃɐssɐd sı̣ɥʇ uı̣ ƃuı̣ɥʇǝɯos noʎ llǝʇ oʇ ǝʌɐɥ I :ɹɐǝp ʎɯ

所以就写了这个js

eg.输入 hello world
输出 pןɹoʍ oןןǝɥ

代码如下。

//这段代码by segmentfault大神
function convert(str) {
var count = 0;
var strArray = str.toUpperCase().split('');
strArray.forEach(function(item, index) {
count += item.charCodeAt() - 64 + index*25;
})
return count
}
//

var input = dialogs.rawInput("请输入需转换英文")
var i = input.length-1
var otp = 1
var outputstr = ""
var zmthb = ["ɐ","q","ɔ","p","ǝ","ɟ","ɓ","ɥ","ı","ſ̣","ʞ","ן","ɯ","u","o","d","b","ɹ","s","ʇ","n","ʌ","ʍ","x","ʎ","z"]
while(true){
var id = input.substring(i+1,i);
id = convert(id) -1
if (id == -33) //判定空格
{
outputstr = outputstr+" "
}
else if(id == -1)
{ //转换完成
break
}
else
{
outputstr = outputstr+zmthb[id]
}
i-- //得倒着来
}
setClip(outputstr)
dialogs.alert("转换结果为",outputstr)
toast("已复制到剪贴板")

管理员

要是有中文就好了

@qq1103 复制,粘贴,点击运行。

@2302004040一键生成非主流倒立英文句子 中说:

今天打开网易日推,看到有这样的评论:

🙃¡ǝɹɐ noʎ oɥʍ ʍouʞ uɐɔ I os uoʇʇnq ǝɥʇ ʞɔı̣lɔ uɐɔ noʎ 'ƃuǝʇuɐpǝpuɐı̣x lǝǝɟ oslɐ noʎ ʇɐɥʇ suɐǝɯ ǝƃɐssɐd sı̣ɥʇ pɐǝɹ uɐɔ noʎ ɟı̣ 'ǝƃɐssɐd sı̣ɥʇ uı̣ ƃuı̣ɥʇǝɯos noʎ llǝʇ oʇ ǝʌɐɥ I :ɹɐǝp ʎɯ

所以就写了这个js

eg.输入 hello world
输出 pןɹoʍ oןןǝɥ

代码如下。

//这段代码by segmentfault大神
function convert(str) {
var count = 0;
var strArray = str.toUpperCase().split('');
strArray.forEach(function(item, index) {
count += item.charCodeAt() - 64 + index*25;
})
return count
}
//

var input = dialogs.rawInput("请输入需转换英文")
var i = input.length-1
var otp = 1
var outputstr = ""
var zmthb = ["ɐ","q","ɔ","p","ǝ","ɟ","ɓ","ɥ","ı","ſ̣","ʞ","ן","ɯ","u","o","d","b","ɹ","s","ʇ","n","ʌ","ʍ","x","ʎ","z"]
while(true){
var id = input.substring(i+1,i);
id = convert(id) -1
if (id == -33) //判定空格
{
outputstr = outputstr+" "
}
else if(id == -1)
{ //转换完成
break
}
else
{
outputstr = outputstr+zmthb[id]
}
i-- //得倒着来
}
setClip(outputstr)
dialogs.alert("转换结果为",outputstr)
toast("已复制到剪贴板")

@o了吗 中文岂不是要有倒转的中文字库😌

  • 7
    帖子
  • 1067
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待