Remove JQuery from the context popup window
This commit is contained in:
parent
10b33dbd20
commit
91c54e1853
@ -178,8 +178,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/mixed/lib/jquery.min.js"></script>
|
|
||||||
|
|
||||||
<script src="/mixed/js/extension.js"></script>
|
<script src="/mixed/js/extension.js"></script>
|
||||||
|
|
||||||
<script src="/bg/js/api.js"></script>
|
<script src="/bg/js/api.js"></script>
|
||||||
|
@ -26,26 +26,26 @@ function showExtensionInfo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupButtonEvents(selector, command, url) {
|
function setupButtonEvents(selector, command, url) {
|
||||||
const node = $(selector);
|
const node = document.querySelector(selector);
|
||||||
node.on('click', (e) => {
|
node.addEventListener('click', (e) => {
|
||||||
if (e.button !== 0) { return; }
|
if (e.button !== 0) { return; }
|
||||||
apiCommandExec(command, {newTab: e.ctrlKey});
|
apiCommandExec(command, {newTab: e.ctrlKey});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
})
|
}, false);
|
||||||
.on('auxclick', (e) => {
|
node.addEventListener('auxclick', (e) => {
|
||||||
if (e.button !== 1) { return; }
|
if (e.button !== 1) { return; }
|
||||||
apiCommandExec(command, {newTab: true});
|
apiCommandExec(command, {newTab: true});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
}, false);
|
||||||
|
|
||||||
if (typeof url === 'string') {
|
if (typeof url === 'string') {
|
||||||
node.attr('href', url);
|
node.href = url;
|
||||||
node.attr('target', '_blank');
|
node.target = '_blank';
|
||||||
node.attr('rel', 'noopener');
|
node.rel = 'noopener';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(utilAsync(() => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
showExtensionInfo();
|
showExtensionInfo();
|
||||||
|
|
||||||
apiGetEnvironmentInfo().then(({browser}) => {
|
apiGetEnvironmentInfo().then(({browser}) => {
|
||||||
@ -78,4 +78,4 @@ $(document).ready(utilAsync(() => {
|
|||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
});
|
});
|
||||||
}));
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user