前几天我突然发现自己的 goindex 网页打开是一片空白,然后才知道 donwa 大佬删库了,于是我找了其他的仓库部署了一下网页,今天偶然发现网页打不开是有解决办法的,看到了一篇博文,所以就赶快修改了自己的代码,非常感谢,下面是解决方法,另外博文参考自:
- 解决goindex作者删库,导致goindex打不开的问题 - 天下无鱼 https://shikey.com/2020/04/27/goindex-index-js-repack.html
- 【可选】首先到 GitHub Fork一份 Goindex 的代码。
- 登录CF,打开workers,选中项目修改原代码部分的一行即可。具体操作如下 —— 找到以下代码,一般是在 21行/23行 。
!图片加载不出来可直接访问:http://dwz.date/awtQ
PS:以下内容为原始内容。
Google Drive Directory Index
Combining the power of Cloudflare Workers and Google Drive will allow you to index you files on the browser on Cloudflare Workers.
index.js
is the content of the Workers script.
material: https://index.gd.workers.dev/
classic: https://indexc.gd.workers.dev/
1.Install rclone
software locally
2.Follow https://rclone.org/drive/ bind a drive
3.Execute the commandrclone config file
to find the file rclone.conf
path
4.Open rclone.conf
,find the configuration root_folder_id
and refresh_token
5.Download index.js in https://github.com/donwa/goindex and fill in root and refresh_token
6.Deploy the code to Cloudflare Workers
1.Open https://installen.gd.workers.dev/
2.Auth and get the code
3.Deploy the code to Cloudflare Workers
Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 150+ global data centers.