用于用户脚本的便携式灯箱
我尝试过在我的用户脚本中实现各种灯箱,但我从未让它们工作。最常见的问题是其中一些需要您修改 css/js 文件,设置各种图像文件的位置。如果不是这种情况,则图像必须位于当前服务器上的特定位置。当我不拥有我想要修改的服务器时,这是不可能的。
灯箱应该能够:
- 使用前进/后退箭头一次显示一张图像。
不是必需的,但会很好:
- 灯箱底部的图像编号,允许跳转到特定的图像编号。
请提供一个在用户脚本中实现的示例。该脚本可以使用 // @require
和 // @resource
字段。
I have tried to implement various lightboxes into my userscripts, but I have never gotten them to work. The most common problem is some of them require's you to modify a css/js file, setting where various image files located. If this is not the case, the image must be located on a specific location on the current server. This is of source not possible, when I don't own the servers I wish to modify.
The lighbox should be able to:
- Display one image at once with forward/back arrows.
Not required, but would be nice:
- A numbering of the images at the bottom of the lightbox, allowing to jump to a specific image number.
Please provide an example of it being implemented in an userscript. The script may use the // @require
and // @resource
fields.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Lightbox2(恰好是“lightbox”的第一个 Google 结果)没有提及需要修改任何 CSS / JS 文件或执行任何操作,除了在页面上包含它们的脚本,并用完整尺寸图像的链接包装缩略图。如果您尝试过此操作,有什么具体问题吗?
Lightbox2, coincidentally the first Google result for "lightbox", doesn't mention the need to edit any CSS / JS files or do anything besides include their scripts on the page, and wrapping the thumbnails with a link to the full sized images. If you've tried this, was there any specific problem with it?