Skip to content

Commit

Permalink
fix: wrapping user scripts for better isolation
Browse files Browse the repository at this point in the history
The scripts clash with each other otherwise (tested in Firefox with
Greasemonkey), namely the jQuery object got overwritten.
  • Loading branch information
pbodnar committed May 25, 2019
1 parent 070ba4c commit 15c15da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions JIRA_copy.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// @require https://raw.githubusercontent.com/jeresig/jquery.hotkeys/0.2.0/jquery.hotkeys.js
// ==/UserScript==

(function($) {

var traceOn = true;

trace('starting...');
Expand Down Expand Up @@ -400,3 +402,5 @@ function VisibilityBinder(targetEl, cfg) {
});
}
}

})(jQuery);
4 changes: 4 additions & 0 deletions JIRA_shortcuts.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// @require https://raw.githubusercontent.com/jeresig/jquery.hotkeys/0.2.0/jquery.hotkeys.js
// ==/UserScript==

(function($) {

var traceOn = true;

trace('starting...');
Expand Down Expand Up @@ -388,3 +390,5 @@ function VisibilityBinder(targetEl, cfg) {
});
}
}

})(jQuery);

0 comments on commit 15c15da

Please sign in to comment.