0%

之前 mido 刷的 AEX 经常出现卡死重启的问题,趁着有空,决定要升到 Android 10 了。
使用的 ROM:PixelExperience_Plus_mido-10.0-20200524-1251-OFFICIAL
使用的 Recovery:OrangeFox-R10.1_1-Stable-mido
使用的内核:3.18.140-Ethereal-28.0~Nuance
Root:Magisk
顺便逛了一下 XDA,发现了修改开机第一屏的方法

使用体验:
还是熟悉的感觉,因为自带了谷歌全家桶,不用刷 GApps 了。

网络去叉,还是和 8.1 的一样,使用以下命令:

1
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204

未设置前,使用 adb shell settings get global captive_portal_https_url 显示为 null,在 AEX 也是如此,据说系统语言选择为中文的时候默认是设置为 V2EX 的站点,在 AEX 用命令替换了无效,在 PE 替换倒是成功了。

目前没什么大问题,就这样。
哪天 mido 被淘汰了,也可以试试这个 Ubuntu Touch for Redmi Note 4X

最近在写 Arduino 的时候发现一种新的初始化方式,通过寄存器来控制端口,这种方法可以更快的完成端口初始化。

阅读全文 »

打开网页,Ctrl+Shift+C 调出开发者工具,点选需要按下的按钮或元素,查看 html 源码,找到多个元素的相同点
例如:

1
2
3
<button aria-label="按钮 1" type="button" class="Button VoteButton VoteButton--up">按钮 1</button>
<button aria-label="按钮 2" type="button" class="Button VoteButton VoteButton--up">按钮 2</button>
<button aria-label="按钮 3" type="button" class="Button VoteButton VoteButton--up">按钮 3</button>

可以看出,这些按钮的 class 是相同的,都是”Button VoteButton VoteButton–up”

打开 Console,输入:

1
document.getElementsByClassName("Button VoteButton VoteButton--up")

可以看到返回了一堆结果

接下来开始测试点击效果

1
document.getElementsByClassName("Button VoteButton VoteButton--up")[0].click()

如果没有意外,第一个按钮的点击事件已经被触发了

那么开始写批量脚本:

1
2
3
4
var buttons = document.getElementsByClassName("Button VoteButton VoteButton--up");
for (var i = 0; i < buttons.length; i++) {
buttons[i].click();
}

或者

1
2
3
while(document.getElementsByClassName("Button VoteButton VoteButton--up")[0] != null){
document.getElementsByClassName("Button VoteButton VoteButton--up")[0].click();
}

这就完成了,可以把页面上所有按钮都点一遍!

RaspberryPi(树莓派)板上有两个 LED,默认情况下,红色用于指示电源,绿色用于指示对 SD 卡的读写。
通过修改设置,可以使它们用于显示其他信息。

阅读全文 »