reading-am / reading

The dreams! The dreams! It's all just absurdity in the light of day but the dreams!
MIT License
10 stars 0 forks source link

Anchor is showing up as âš“ in Chrome/OS X on [pg post](http://paulgraham.com/growth.com) #294

Closed thebyrd closed 12 years ago

thebyrd commented 12 years ago

a weird character is showing up next to share on comments when you hover over them (I'm on Chrome/OS X). see screen shot here

Jud commented 12 years ago

Looks like it might be due to the page's encoding, which is 'ISO-8859-1' instead of UTF-8. It can be detected with document.characterSet (on chrome).

Jud

thebyrd commented 12 years ago

@Jud document.characterSet is good to know. I at tweeted pg to see if he'll fix it. I guess the real solution would be:

if (document.characterSet != "UTF-8") {
  //Because you don't have jquery selectors for some reason:
  var script = document.createElement('script');
  script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js';
  script.type = 'text/javascript';
  document.getElementsByTagName('head')[0].appendChild(script);
  $('.r_permalink').html('<img src="http://byrdhou.se/reading-anchor.png" alt="Anchor" />');
}

except with the properly resized (and transparent background) version of the image on a CDN and the url supplied by rails and not hard coded.

Sorry everyone for all of the edits.

leppert commented 12 years ago

Also a problem here: http://1997.webhistory.org/www.lists/www-talk.1993q1/0182.html

thebyrd commented 12 years ago

Also a problem here.