Skip to content

Bookmarklet doesn't work on local files due to protocol-relative URL #30

@vermeer

Description

@vermeer

The bookmarklet currently loads a script from //css-tricks.github.io/The-Printliminator.... This works when relative to an https:// URL and even when relative to an http:// URL, but when viewing, for example, HTML help files on your own machine from file:///C:/local%20content... it tries to load the script from file:///css-tricks.github.io instead of the CDN and fails.

That protocol-relative URL would be useful if this was originally deployed on an insecure page, and later github.io updated to serve it from an https:// domain, but it's 2024. Serving the script over HTTPS works when running the bookmarklet from another https site, from an http site, or from a file:// site, so there's no reason not to use it everywhere.

Please change the bookmarklet from:

loadScript('//css-tricks.github.io/The-Printliminator/printliminator.min.js'

to

loadScript('https://css-tricks.github.io/The-Printliminator/printliminator.min.js'

to make it work on local files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions