加载Js([[var btn=document.createElement("div");
var t=document.createTextNode("➜");
btn.style = 'position: fixed;width: 50px;height: 50px;line-height: 50px;border-radius: 50%;bottom: 20px;right: 20px; text-align: center;background-color:white;box-shadow: 0 2px 10px rgba(0,0,0,.5);cursor: pointer; z-index: 1051;';
btn.onclick=function(){window.location.href="https://baidu.com/";};
btn.appendChild(t);
document.body.appendChild(btn);]])
document.body.style.marginTop='-100px'
加载网页("file://"..activity.getLuaDir().."/index.html")
加载Js('document.getElementsByClassName("iconfont icon-search")[0].click();')
var elscript = document.createElement("style");
elscript.innerHTML=` @font-face {
font-family: "moonbridge";
src: url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.woff2") format("woff2"),
url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.woff") format("woff"),
url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.ttf") format("truetype"),
url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.eot") format("embedded-opentype"), url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.svg") format("svg"),
url("https://ku.oioweb.cn/Resources/font/造字工房悦圆/moonbridge.otf") format("opentype");
font-weight: normal;
font-style: normal;
font-display: swap;
}
body{
font-family: 'moonbridge'
}
`
elscript.setAttribute("type","text/css");
document.head.appendChild(elscript);
php = 1000
function net()
task(1,function()
if (php > 1) then
php=php-1
local wl=activity.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE).getActiveNetworkInfo();
if wl== nil then
退出页面()
end
else
end
net()
end)
end
net()
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
activity.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE)
--首次启动弹出窗口的代码
function getData(name,key)
local data=this.getApplicationContext().getSharedPreferences(name,0).getString(key,nil)
return data
end
function putData(name,key,value)
this.getApplicationContext().getSharedPreferences(name,0).edit().putString(key,value).apply()--3255-2732
return true
end
if not getData("welcome","启动过了") then
putData("welcome","启动过了","启动过了")
--事件
else
--事件
end
width: 200px;height: 150px;background: linear-gradient(red, white);
border-radius: 20px;
border-bottom-right-radius: 20px; border-top-right-radius: 20px;
border-top-left-radius: 20px; border-bottom-left-radius: 20px;