dascritch / anchors-reveal Goto Github PK
View Code? Open in Web Editor NEWIndicate anchors in a web page
Indicate anchors in a web page
Via e-mail :
A reviewer sent a message regarding the review of version 1.0 of add-on Anchors reveal.
erosman wrote:
Please note the following for the next update:
For inserting text, textContent (or JQuery text) or createTextNode() should be used instead of innerHTML.
eg:
legends[0].innerHTML = browser.i18n.getMessage('themeParameterDescription');
Add-on contains duplicate/hidden/unused/unnecessary files or folders. These complicate the review process and may contain sensitive information about the system you created the XPI on. Such files may also create cause for rejection. Please correct your packaging process so that these files aren't included.
e.g.:
lib.js
If you want to respond please reply to this email or visit https://addons.mozilla.org/en-US/developers/addon/anchors-reveal/versions
You are receiving this email because you are an author of this add-on.
First of all, thank you for this add-on! I've found a bug, and I think it's quite easy to fix.
Steps to reproduce:
What happens:
Mainly the form fields are marked by AR.
What should happen:
The headings should be marked as well.
Currently AR does these checks on each element having an ID:
function(el) {
if (
(el.id.indexOf(prefix)!==0) // not generated by the addon ?
&& ( valid_id.test(el.id) ) // not malicious ?
&& (!el.hidden) && (el.style.display !== 'none') // visible ?
&& ( (el.clientWidth != 0) && (el.clientHeight != 0 ) ) // really visible ?
) {
In this case all tests evaluate to true
, but clientWidth
and clientHeight
are false
.
I did some research and it looks like it's better to use offsetWidth
and offsetHeight
. JQuery additionally uses getClientRects().length
, see jquery's code:
jQuery.expr.filters.visible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};
You might want to take that expression instead of the current ones. You could also remove usage of el.hidden
and el.style.display
.
MDN documentation: HTMLElement.offsetWidth
, HTMLElement.offsetHeight
, Element.getClientRects()
.
I've got a big issue if the element is inline. As in Wikipedia.
For GitHub, sorry but their improperly use of name="" should be ashamed
Le locales are there : https://github.com/dascritch/anchors-reveal/tree/master/_locales
License name in README.md:
Purpose -> Public
In the AMO description:
clic -> click
Also the AMO description could be a little more elaborate, non-web developers might not know exactly what an anchor is.
See addons reviews #874609/ :
One click shows the anchor, another click hides them. Very simple! But please, add an option to customize how it is shown. This yellow colour is too aggressive for me.
Yes, it is right. But we have a very simple addon (I bet on minimal functionality).
Perhaps I do some (home) works to build a simple preference page
After installation of v1.0 from AMO and enabling the contextual menu I do get the menu but nothing is happening when selecting it. The menubar icon button do work however.
I see no output on the javascript console when selecting it either.
The issue is longely known
github/markup#349 (comment)
A patch is proposed
gjtorikian/html-pipeline#136
gjtorikian/html-pipeline#135
I don't know if they will accept it :/
Mainly because shadowDOM is not style contaminated by host page
No use to show the anchor of a empty or undisplayed element. Especially when hotlinking a document.
Anchors-reveal should be able to be invoked via a shortkey. The sequence must be parametrable because of the number of potential addons.
If the user is resizing its viewport (resizing window of orientation device), tags ID aren't moving accordingly.
The script should redraw/recalc on this event.
If the page is modifying its aspect (DOM mutation or CSS property), tags ID aren't moving accordingly.
The script should redraw/recalc on this event.
If element is positionned at top:0 and left:0 of the document, it should not be shown.
Add a sidebar with the anchors lists (linked to the anchor)
Actual button logo is a borrowing from the default KDE theme Oxygen by the Oxygen Team .
It will be useful to have a more original one, and in svg to not doing stupidful verbose declarations.
Do you remember <link rel="apple-touch-icon"โฆ >
?
i use 'translate selected' from the menu, so it would be good to move this item to bottom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.