- Linting (ESLint): Prefer addEventListener, exponentiation operator, avoiding catastrophic regexes, prefer spread, prefer startsWith/endsWith, no fn ref in iterator
- npm: Update devDeps (rollup and eslint-config-ash-nazg)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable unicorn/no-fn-reference-in-iterator */
|
||||
/**
|
||||
* ext-connector.js
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@ $('a').click(function () {
|
||||
});
|
||||
if (!href.includes('.svg')) {
|
||||
const img = new Image();
|
||||
img.onload = function () {
|
||||
img.addEventListener('load', function () {
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
@@ -37,7 +37,7 @@ $('a').click(function () {
|
||||
data = '';
|
||||
}
|
||||
post({href, data});
|
||||
};
|
||||
});
|
||||
img.src = href;
|
||||
} else {
|
||||
// Do ajax request for image's href value
|
||||
|
||||
Reference in New Issue
Block a user