vite-plugin-specter 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +7 -11
- package/dist/extension-chrome/background.js +4 -0
- package/dist/extension-chrome/content.js +982 -0
- package/dist/extension-chrome/icons/icon128.png +0 -0
- package/dist/extension-chrome/icons/icon16.png +0 -0
- package/dist/extension-chrome/icons/icon32.png +0 -0
- package/dist/extension-chrome/icons/icon48.png +0 -0
- package/dist/extension-chrome/manifest.json +38 -0
- package/dist/extension-firefox/content.js +7 -11
- package/dist/extension-firefox/manifest.json +8 -2
- package/dist/index.cjs +7 -11
- package/dist/index.js +7 -11
- package/extension/background.js +1 -5
- package/extension/content.js +7 -11
- package/extension/manifest.firefox.json +21 -7
- package/extension/manifest.json +8 -6
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -273,17 +273,11 @@
|
|
|
273
273
|
return { hex: toHex(m[1], m[2], m[3]), alpha: m[4] !== undefined ? parseFloat(m[4]) : 1 };
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
function colorLabel(str) {
|
|
277
|
-
var c = parseColor(str);
|
|
278
|
-
if (!c) return null;
|
|
279
|
-
if (c.alpha < 1) return c.hex + ' (' + Math.round(c.alpha * 100) + '% opacity)';
|
|
280
|
-
return c.hex;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
276
|
function colorObj(str) {
|
|
284
277
|
var c = parseColor(str);
|
|
285
278
|
if (!c) return null;
|
|
286
|
-
|
|
279
|
+
var label = c.alpha < 1 ? c.hex + ' (' + Math.round(c.alpha * 100) + '% opacity)' : c.hex;
|
|
280
|
+
return { raw: str, hex: c.hex, alpha: c.alpha, label: label };
|
|
287
281
|
}
|
|
288
282
|
|
|
289
283
|
function edge(t, r, b, l) {
|
|
@@ -485,6 +479,7 @@
|
|
|
485
479
|
function clearHoverOutline() {
|
|
486
480
|
if (outlinedEl) {
|
|
487
481
|
outlinedEl.style.outline = prevOutline;
|
|
482
|
+
outlinedEl.style.outlineOffset = '';
|
|
488
483
|
outlinedEl = null;
|
|
489
484
|
}
|
|
490
485
|
}
|
|
@@ -561,7 +556,7 @@
|
|
|
561
556
|
}
|
|
562
557
|
|
|
563
558
|
function clearSelection() {
|
|
564
|
-
selectedEls.forEach(function (el) { el.style.outline = ''; });
|
|
559
|
+
selectedEls.forEach(function (el) { el.style.outline = ''; el.style.outlineOffset = ''; });
|
|
565
560
|
selectedEls.length = 0;
|
|
566
561
|
selectedBadges.forEach(function (b) { b.remove(); });
|
|
567
562
|
selectedBadges.length = 0;
|
|
@@ -976,8 +971,9 @@
|
|
|
976
971
|
|
|
977
972
|
window.__specterToggle = function() { if (fiActive) deactivate(); else activate(); };
|
|
978
973
|
|
|
979
|
-
|
|
980
|
-
|
|
974
|
+
var _rt = (typeof browser !== 'undefined' && browser.runtime) || (typeof chrome !== 'undefined' && chrome.runtime);
|
|
975
|
+
if (_rt && _rt.onMessage) {
|
|
976
|
+
_rt.onMessage.addListener(function(msg) {
|
|
981
977
|
if (msg && msg.type === 'specter-toggle') window.__specterToggle();
|
|
982
978
|
});
|
|
983
979
|
}
|