chengyin / WhatFont-Bookmarklet

The core of WhatFont Tool
http://chengyinliu.com/whatfont.html
University of Illinois/NCSA Open Source License
488 stars 74 forks source link

Https support #8

Open ionelmc opened 10 years ago

ionelmc commented 10 years ago

Would be nice to have the bookmarklet not load http content.

glajchs commented 10 years ago

The bookmark doesn't work for me in firefox on https sites, due to the fact that it only loads via http. You get an error about blocking mixed content. I realize I could change my firefox settings away form defaults to allow this, but it would be nice if I didn't have to.

I also tried hardcoding it to https, but this does't work as the resource isn't available over https. Two things need to be done here:

  1. Need to serve up the JS at HTTPS as well at "https://chengyinliu.com/wf.js"
  2. Need to change the scriptlet to point to whatever protocol the page is using change: s.setAttribute('src','https://chengyinliu.com/wf.js..... to: s.setAttribute('src',document.location.protocol + '://chengyinliu.com/wf.js.....
exalted commented 8 years ago

:+1:

Broken on Safari 9 now as well.

phnah commented 8 years ago

Since I cannot access chengyinliu.com to fix the https error. I fixed this by serving the files using Rawgit

The changed version is here: https://gist.github.com/hanhpho/6578e7033a3fc0288ba8

exalted commented 8 years ago

@hanhpo darn... That's clever! 👏👏

ntwb commented 7 years ago

Neat solution @hanhpho 👍 , that said I'd love to see this fixed here...

(With the latest Chrome it's also now blocking the script)

cc @chengyin

phuang07 commented 6 years ago

Well done. @hanhpho