Mark link that was clicked
This commit is contained in:
parent
50c8b8f17e
commit
1895fec3cf
@ -432,6 +432,8 @@ function getIdentifierInternal(urlstr) {
|
|||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
var lastGeneratedLinkId = 0;
|
||||||
|
|
||||||
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||||
|
|
||||||
if (message.updateAllLabels) {
|
if (message.updateAllLabels) {
|
||||||
@ -468,6 +470,12 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|||||||
|
|
||||||
var exact = snippets.filter(x => x && x.contains(lastRightClickedElement))[0] || null;
|
var exact = snippets.filter(x => x && x.contains(lastRightClickedElement))[0] || null;
|
||||||
|
|
||||||
|
|
||||||
|
message.linkId = ++lastGeneratedLinkId;
|
||||||
|
|
||||||
|
if (lastRightClickedElement)
|
||||||
|
lastRightClickedElement.setAttribute('shinigami-eyes-link-id', lastGeneratedLinkId);
|
||||||
|
|
||||||
message.snippet = exact ? exact.outerHTML : null;
|
message.snippet = exact ? exact.outerHTML : null;
|
||||||
var debugClass = 'shinigami-eyes-debug-snippet-highlight';
|
var debugClass = 'shinigami-eyes-debug-snippet-highlight';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user