- navigation_bar
- tabs_bar
- find_bar
- {side}_{end/start}
- where side is top/left/right/bottom
- Possibly more UI regions unlikely to change (future proof)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import base Devtools SDK Panel constructor | |
const { Panel } = require("dev/panel"); | |
// import Devtools SDK Toolbox manager constructor | |
const { Tool } = require("dev/toolbox"); | |
// import Class helper from the Addon SDK | |
const { Class } = require("sdk/core/heritage"); | |
// import self module needed to result data resources urls | |
var self = require('sdk/self'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RegularOctogon(w=0, offset=[0,0]) { | |
this.w = w; | |
this.offset = offset; | |
return this; | |
} | |
RegularOctogon.prototype = { | |
/* | |
Failed ASCII (regular) octogon | |
____w____ | |
___ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WIP, most of this doesn't work | |
var svgns = "http://www.w3.org/2000/svg"; | |
var banned = { | |
namespaces: ["sketch", "illustrator", "sopodi", "inkscape"], | |
tags: ["title", "desc"], | |
tagsIfEmpty: ["defs", "g", "style"], | |
attributes: ["enable-background", "xml:space", "version"] | |
}; | |
var invisibleShapesData = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This snippet lets you watch for properties removed from an object | |
console.diff = (object, id) => { | |
let obj = Object.keys(object); | |
if (!id) { | |
id = "diff" + Date.now(); | |
console.lastDiffId = id; | |
} | |
let listener = addEventListener("diffEnd", (e) => { | |
if (id && e.detail.id != id) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tabs = require("sdk/tabs"); | |
const { viewFor } = require("sdk/view/core"); | |
let messageManager = viewFor(tabs.activeTab).linkedBrowser.messageManager; | |
messageManager.loadFrameScript(self.data.url("yourframescript.js"), false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPositionReference(node) { | |
let pos = getComputedStyle(node).getPropertyValue("position"); | |
switch (pos) { | |
case "relative": | |
return node; | |
case "absolute": | |
let parentPosition = "static"; | |
let parent = node.parentNode; | |
while (parentPosition == "static" && parent.parentNode) { | |
parent = parent.parentNode; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer