From 5176377045d25ab00ed4653f980e9a95a17b0e31 Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 20 Feb 2015 01:51:06 -0800 Subject: Fix many features for Internet Explorer 9 and 10 Please don't use "dataset" in scripts anymore, it doesn't work in IE9 or 10. Instead use $.data --- js/id_colors.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/id_colors.js') diff --git a/js/id_colors.js b/js/id_colors.js index 17f8b4d9..6335f960 100644 --- a/js/id_colors.js +++ b/js/id_colors.js @@ -1,18 +1,18 @@ if (active_page == 'thread' || active_page == 'index') { $(document).ready(function(){ if (window.Options && Options.get_tab('general')) { - selector = '#color-ids>input'; - event = 'change'; + var selector = '#color-ids>input'; + var e = 'change'; Options.extend_tab("general", ""); } else { - selector = '#color-ids'; - event = 'click'; + var selector = '#color-ids'; + var e = 'click'; $('hr:first').before('
'+_('Color IDs')+'
') } - $(selector).on(event, function() { + $(selector).on(e, function() { if (localStorage.color_ids === 'true') { localStorage.color_ids = 'false'; } else { -- cgit v1.3 From 04f42b3802631a825d8ef112b153e66e962a0e66 Mon Sep 17 00:00:00 2001 From: fatchan Date: Wed, 1 Jun 2016 19:51:21 +1000 Subject: CSS hover instead of javascript mouseover. Need to use important because the dark/light text determined by IDToRGB is added inline and takes priority over stylesheets. --- js/id_colors.js | 6 ------ stylesheets/style.css | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'js/id_colors.js') diff --git a/js/id_colors.js b/js/id_colors.js index 6335f960..55454476 100644 --- a/js/id_colors.js +++ b/js/id_colors.js @@ -50,12 +50,6 @@ if (active_page == 'thread' || active_page == 'index') { "border-radius": "8px", "color": ft }); - - $(el).mouseover(function() { - $(this).css('color', '#800000'); // how about a CSS :hover rule instead? - }).mouseout(function() { - $(this).css('color', ft); - }); } $(".poster_id").each(function(k, v){ diff --git a/stylesheets/style.css b/stylesheets/style.css index 39d1fd04..7bedfe14 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -913,7 +913,9 @@ pre { .poster_id { cursor: pointer; } - +.poster_id:hover { + color: #800000!important; +} .poster_id::before { content: " ID: "; } -- cgit v1.3