Regular/网址:修订间差异
来自康健生活
创建页面,内容为“== 标题文字 == {{leftrightflex|<syntaxhighlight lang="javascript"> const currentURL = 'https://kangkk.cn/index.php?title=Regular/%E7%BD%91%E5%9D%80&action=edit&r…” |
小 文字替换 -“{{leftrightflex|”替换为“{{Double-columns|” 标签:ReplaceText 移动版编辑 移动版网页编辑 |
||
| (未显示同一用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
== 标题文字 == | == 标题文字 == | ||
{{ | {{Double-columns|<syntaxhighlight lang="javascript"> | ||
const currentURL = 'https://kangkk.cn/index.php?title=Regular/%E7%BD%91%E5%9D%80&action=edit&redlink=1'; | const currentURL = 'https://kangkk.cn/index.php?title=Regular/%E7%BD%91%E5%9D%80&action=edit&redlink=1'; | ||
const host = currentURL.replace(/^(htt(ps|p):\/\/[a-zA-Z\-.0-9]+(:[0-9]+)?).+/, '$1'); | const host = currentURL.replace(/^(htt(ps|p):\/\/[a-zA-Z\-.0-9]+(:[0-9]+)?).+/, '$1'); | ||
</syntaxhighlight>|{{consoleout|<pre> | </syntaxhighlight>|{{consoleout|<pre> | ||
'https://kangkk.cn' | 'https://kangkk.cn' | ||
</pre>}}}} | |||
设置过滤 referrer。 | |||
{{Double-columns|<syntaxhighlight lang="javascript"> | |||
!/^(((audit|beta)?(-?security)?\.)?design\.qihoo\.net|10\.\d+\.\d+\.\d+)$/.test(referrer)</syntaxhighlight>|{{consoleout|<pre> | |||
false | |||
</pre>}}}} | </pre>}}}} | ||