Skip to content

Commit

Permalink
fix: replace var keyword with const/let (#11512)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianaSau committed Oct 19, 2022
1 parent a5d2483 commit 4909bad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/research-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Nice tips on jquery inclusion etc here: http://www.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/

function getSelText() {
var SelText = '';
let SelText = '';
if (window.getSelection) {
SelText = window.getSelection();
} else if (document.getSelection) {
Expand All @@ -17,12 +17,12 @@ function getSelText() {
(function(){

// the minimum version of jQuery we want
var v = "1.3.2";
const v = "1.3.2";

// check prior inclusion and version
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) {
var done = false;
var script = document.createElement("script");
let done = false;
const script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
Expand All @@ -49,4 +49,4 @@ function getSelText() {
})();
}

})();
})();

0 comments on commit 4909bad

Please sign in to comment.