From 24d54d5dbbb393cd125eb2c18470cc318b16878d Mon Sep 17 00:00:00 2001 From: Lapo Luchini Date: Sun, 30 May 2021 11:56:22 +0200 Subject: [PATCH] Fix bookmarklet layout to work on more pages. `display: block` is needed on some pages that have local CSS overrides that happen to apply to our elements as well. `z-index: 2147483647` seems to be the maximum allowed values, as per http://web.archive.org/web/20160502062529/http://www.puidokas.com/max-z-index Fixes #273 on GitHub upstream. --- pinry/static/js/bookmarklet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pinry/static/js/bookmarklet.js b/pinry/static/js/bookmarklet.js index 3fe7f48..1f943a2 100644 --- a/pinry/static/js/bookmarklet.js +++ b/pinry/static/js/bookmarklet.js @@ -38,7 +38,8 @@ pinryImages.id = 'pinry-images'; setCSS(pinryImages, { position: 'fixed', - zIndex: 9001, + display: 'block', + zIndex: 2147483647, background: 'rgba(0, 0, 0, 0.7)', paddingTop: '70px', top: 0, @@ -52,6 +53,7 @@ var pinryBar = document.createElement('div'); pinryBar.id = 'pinry-bar'; setCSS(pinryBar, { + display: 'block', background: 'black', padding: '15px', position: 'absolute',