Skip to content

Commit

Permalink
Add space after function keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSobky committed Oct 12, 2022
1 parent 3075537 commit 9c7de0b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions deanonymize.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
var elNodes, testFn;
var output = [];
// Register a new cross-browser event listener.
var addListener = (function() {
var addListener = (function () {
return (window.addEventListener) ? window.addEventListener :
// For IE8 and earlier versions support.
function (evName, callback) {
Expand All @@ -22,7 +22,7 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
* @param tagName {string}, elements' tag name.
* @return {array}, an array of DOM nodes.
*/
var createElements = function(tagName) {
var createElements = function (tagName) {
var i, l, el;
var elNodes = [];
for (i = 0, l = idList.length; i < l; i++) {
Expand All @@ -34,7 +34,7 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
el.rel = 'stylesheet';
}
if (tagName !== 'img') {
el.onerror = function() {
el.onerror = function () {
this.parentElement.removeChild(this);
};
}
Expand All @@ -48,7 +48,7 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
* @param testFn {function}, a test function.
* @return void.
*/
var assess = function(testFn) {
var assess = function (testFn) {
var i, l;
for (i = 0, l = elNodes.length; i < l; i++) {
if (testFn(elNodes[i])) {
Expand All @@ -66,7 +66,7 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
* @param imageNode {object}, a DOM image node.
* @return {boolean}.
*/
testFn = function(imgNode) {
testFn = function (imgNode) {
if (imgNode.naturalHeight !== 0 && imgNode.naturalWidth !== 0) {
return true;
}
Expand All @@ -80,12 +80,12 @@ function deanonymize(attackMethod, endpoint, idList, callback) {
* @param el {object}, a DOM element.
* @return {boolean}.
*/
testFn = function(el) {
testFn = function (el) {
if (el.parentNode !== document.documentElement) {
return true;
}
return false;
};
}
addListener.call(window, 'load', function() { assess(testFn); });
addListener.call(window, 'load', function () { assess(testFn); });
}

0 comments on commit 9c7de0b

Please sign in to comment.