From 61ef383b526aab62faaac98ea3d2dfd89ab1ffd1 Mon Sep 17 00:00:00 2001 From: Ben Draut Date: Sun, 27 Jan 2013 00:33:26 -0700 Subject: [PATCH] Version 1.0.2 Release Fixed a couple of bugs. 1) The position was incorrect if the page scrolled. 2) The z-index wasn't set, so sometimes the popup would be behind other popups. --- bubble.css | 1 + manifest.json | 10 ++++++++-- selection.js | 7 ++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bubble.css b/bubble.css index f9626c7..aec77c2 100644 --- a/bubble.css +++ b/bubble.css @@ -11,6 +11,7 @@ top: 0; width: 140px; visibility: hidden; + z-index: 10000; } #ec-bubble-text { diff --git a/manifest.json b/manifest.json index b4775ec..4228493 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,14 @@ "manifest_version": 2, "name": "Epoch Converter", - "description": "This extension will provide a popup showing a human readable date of a highlighted Unix timestamp.", - "version": "1.0", + "description": "Provides a popup showing a human readable date of a highlighted Unix timestamp.", + "version": "1.0.2", + + "icons": { + "16": "icon.png", + "48": "icon.png", + "128": "icon.png" + }, "permissions": [ diff --git a/selection.js b/selection.js index 1cef005..fc2b5c2 100644 --- a/selection.js +++ b/selection.js @@ -1,9 +1,6 @@ $(document).ready(function() { $('body').append("
"); - /*var closeIconUrl = chrome.extension.getURL("close.png"); - alert(closeIconUrl); - $('#ec-bubble-close').css('background-image', "url('" + closeIconUrl + "');");*/ $('#ec-bubble-close').click(function() { hideBubble(); }); @@ -57,8 +54,8 @@ function convertTimestamp(ts) { } function showBubble(e, text) { - $('#ec-bubble').css('top', e.clientY + 20 + "px"); - $('#ec-bubble').css('left', e.clientX - 85 + "px"); + $('#ec-bubble').css('top', e.pageY + 20 + "px"); + $('#ec-bubble').css('left', e.pageX - 85 + "px"); $('#ec-bubble-text').html(text); $('#ec-bubble').css('visibility', 'visible'); }