|
1 | 1 | // ==UserScript== |
2 | 2 | // @name [Zeusro]宽版 dnspod.cn |
3 | 3 | // @namespace https://www.zeusro.tech/ |
4 | | -// @version 0.2.1 |
| 4 | +// @version 1.0.0 |
5 | 5 | // @description 魔改 dnspod 域名配置页 |
6 | 6 | // @author Zeusro |
7 | 7 | // @supportURL https://github.com/zeusro |
8 | 8 | // @match *://www.dnspod.cn/console/dns/* |
9 | 9 | // @match *://www.dnspod.cn/console/dns |
| 10 | +// @match *://www.dnspod.cn/console/* |
10 | 11 | // @grant none |
11 | 12 | // @license GPL-3.0-or-later |
12 | 13 | // @compatible chrome |
|
18 | 19 |
|
19 | 20 | //等待iframe加载 |
20 | 21 | setTimeout(function () { |
21 | | - main() |
22 | | - |
| 22 | + main() |
23 | 23 | }, 2500) |
24 | 24 |
|
25 | 25 |
|
|
65 | 65 | return |
66 | 66 | } |
67 | 67 | // console.log("set containers") |
| 68 | + if(!containers[0]){ |
| 69 | + return |
| 70 | + } |
68 | 71 | containers[0].setAttribute("style", "width:100%") |
69 | 72 | var main = currentDocument.getElementById('main') |
70 | 73 | if (main) { |
|
134 | 137 | this.childNodes[1].childNodes && |
135 | 138 | this.childNodes[1].childNodes[1].childNodes && |
136 | 139 | this.childNodes[1].childNodes[1].childNodes[9]) { |
137 | | - checkCurrentDocument() |
138 | | - console.log("记录类型") |
| 140 | + // checkCurrentDocument() |
| 141 | + // if (!currentDocument) { |
| 142 | + // getCurrentDocument() |
| 143 | + // } |
139 | 144 | //记录类型 |
140 | 145 | this.childNodes[1].childNodes[1].childNodes[5].childNodes[1].setAttribute("style", "width: 100px;") |
141 | 146 | //记录值 |
142 | | - console.log("记录值") |
143 | 147 | this.childNodes[1].childNodes[1].childNodes[9].childNodes[1].setAttribute("style", "width: 278px;") |
144 | 148 | } |
145 | 149 | fixCancelBehavior() |
|
154 | 158 | return |
155 | 159 | } |
156 | 160 | createRecord.addEventListener("click", function () { |
157 | | - console.log("create-record") |
158 | | - getCurrentDocument() |
| 161 | + // console.log("create-record") |
| 162 | + // getCurrentDocument() |
159 | 163 | setTimeout(function () { |
160 | 164 | var entryList = currentDocument.getElementsByClassName("entry") |
161 | 165 | if (!entryList || !entryList[0]) { |
162 | | - console.log("no entry") |
| 166 | + console.warn("no entry") |
163 | 167 | return |
164 | 168 | } |
165 | | - console.dir(entryList[0]) |
166 | 169 | //记录类型 |
167 | 170 | entryList[0].childNodes[1].childNodes[5].childNodes[1].setAttribute("style", "width: 100px;") |
168 | 171 | //记录值 |
|
188 | 191 | } |
189 | 192 | } |
190 | 193 |
|
191 | | - function checkCurrentDocument() { |
192 | | - if (!currentDocument) { |
193 | | - getCurrentDocument() |
194 | | - } |
195 | | - } |
196 | | - |
197 | 194 | function addGlobalStyle_1080p() { |
198 | 195 | //es 6 |
199 | 196 | var css = ` |
|
0 commit comments