找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 102|回复: 4

[BUG] 特定网页上的复制功能有时无效

[复制链接]

18

主题

33

回帖

535

积分

高级会员

积分
535
发表于 前天 10:41 | 显示全部楼层 |阅读模式



网页地址:https://www.wow-petguide.com/Str ... -%E9%BE%8D%E6%97%8F


QQ截图20240919103535.jpg


正常情况下,点击图片中的按钮可以实现复制字符串,但奇怪的是,有时能复制成功,有时复制不成功并返回“String could not be loaded. Make sure your browser has JavaScript active, use a different browser or try again later.”,这时只需要关闭浏览器,重新打开浏览器,再次尝试时就可以复制成功。

我在该网站已设置“JavaScript”为启用,可仍然如此,求助如何解决

回复

使用道具 举报

8

主题

7272

回帖

2万

积分

超级版主

(^^ゞ

积分
20549
发表于 前天 12:44 | 显示全部楼层
看了下网页的脚本代码,我觉得最有可能导致复制到 "String could not be loaded. Make sure your browser has JavaScript active, use a different browser or try again later." 内容的原因是 https://www.wow-petguide.com/js/xufunctions.js 脚本加载失败了。

你在复现到此问题时,可以打开开发者工具(按下 F12)切换至控制台(Console)分页中,先看看红色错误消息中有没有 xufunctions.js 等脚本加载失败的消息。若没有,那直接在控制台中输入以下内容并回车:
  1. create_rematch
复制代码
结果会如下图所示吗?

create_rematch.png

如果结果正常,那就再直接输入一个 $ 并回车结果是否又如下图:

jq.png

若以上这些都正常,那你在点击 "Rematch字串" 按钮时控制台是否会提示什么消息?截个图给我看看。
¯\(°_o)/¯
回复

使用道具 举报

18

主题

33

回帖

535

积分

高级会员

积分
535
 楼主| 发表于 前天 13:39 | 显示全部楼层
S8F8ry 发表于 2024-9-19 12:44
看了下网页的脚本代码,我觉得最有可能导致复制到 "String could not be loaded. Make sure your browser h ...

控制台红字部分查找能发现xufunctions.js

QQ截图20240919133453.jpg


输入 create_rematch 以及$ 得到如下:
QQ截图20240919133555.jpg


当页面处于正常情况时,会得到类似这样的字符串(不同页面不同)

你根本沒在練吧? (元素):6846:21201FE:2210G7:11101DB:N:攻略提供者是 Lazey\nThis is based on the original 10.1 PTR tamer pets' stats/quality/etc. It might need adjustments on last-minute changes (potential nerfs).**Right now we have 4 different Power stats on pets for the 2nd Slot, the script includes them all, but for the written steps I'm just using the weakest 焦土 damage tick to decide if I can kill Swole before it dives. 熔火柯基犬's 熾熱吠叫 alone deals 315 damage, so you may wanna adjust that based on the Power of your second pet:315 + 56 (260P) = 371 (I'm using this in written steps)315 + 59 (276P) = 374315 + 61 (289P) = 376315 + 65 (305P) = 380\n\nWith your 烈酒元素 stick to these priorities until dead:\nPrio 1:: 泡泡\nPrio 2:: 擲桶\n\nBring in your 魔化烈焰 and stick to these priorities until dead:\nPrio 1:: 焦土\nPrio 2:: Enemy is Swole -> 焚燒\nPrio 3:: 火息術\n\n熔火柯基犬 comes in, stick to these priorities:\nPrio 1:: Enemy is Brul'dan -> 熾熱吠叫\nPrio 2:: Swole is Underwater -> 火焰小狗\nPrio 3:: Swole has >371HP** (>315HP without Scorched Earth), can't use Headbutt, Dive is available -> 火焰小狗\nPrio 4:: Scorched Earth is active, Swole is the enemy and not Underwater -> 震天吼 \nPrio 5:: Swole has >315HP and is not Underwater -> 震天吼\nPrio 6:: 熾熱吠叫\nPrio 7:: Pass turn when your pet got stunned (on your last pet that happens automatically)\n


这是一份《魔兽世界》宠物对战的攻略步骤,另外我刚才试着不关闭浏览器,而是刷新页面,发现有时刷新一次可以恢复正常,有时需要刷新几次后恢复正常,也就是并不一定需要关闭浏览器。
回复

使用道具 举报

8

主题

7272

回帖

2万

积分

超级版主

(^^ゞ

积分
20549
发表于 前天 18:55 | 显示全部楼层
gackt0000 发表于 2024-9-19 13:39
控制台红字部分查找能发现xufunctions.js

😩 从控制台截图的错误信息来看,是服务器本身响应 HTML 内容出现了问题,这极有可能是服务器里的程序存在 bug。因为网页中创建待复制内容的操作大致上就是根据当前 HTML 内容去解析一个 battle_table_data 对象(这个对象也是由网页 HTML 中内联脚本所提供),这些内容都是由服务器的程序所生成的,所以这个问题只能由网站管理员能解决。
¯\(°_o)/¯
回复

使用道具 举报

匿名  发表于 昨天 10:09
S8F8ry 发表于 2024-9-19 18:55
😩 从控制台截图的错误信息来看,是服务器本身响应 HTML 内容出现了问题,这极有可能是服务器里的程序存 ...

明白了,谢谢,看来只能等对方修复了
回复

使用道具

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|百分浏览器论坛

GMT+8, 2024-9-21 10:33 , Processed in 0.018452 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表