Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace var declarations with let declarations #576

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/interface/desktop/loading-animation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var $wrap = document.getElementById('loading-animation'),
let $wrap = document.getElementById('loading-animation'),

canvassize = 380,

Expand Down Expand Up @@ -29,7 +29,7 @@ mesh = new THREE.Mesh(
new THREE.TubeGeometry(new (THREE.Curve.create(function() {},
function(percent) {

var x = length*Math.sin(pi2*percent),
let x = length*Math.sin(pi2*percent),
y = radius*Math.cos(pi2*3*percent),
z, t;

Expand Down Expand Up @@ -63,7 +63,7 @@ group.add(ring);

// fake shadow
(function() {
var plain, i;
let plain, i;
for (i = 0; i < 10; i++) {
plain = new THREE.Mesh(new THREE.PlaneGeometry(length*2+1, radius*3, 1), new THREE.MeshBasicMaterial({color: 0xd1684e, transparent: true, opacity: 0.15}));
plain.position.z = -2.5+i*0.5;
Expand Down Expand Up @@ -94,7 +94,7 @@ function tilt(percent) {
}

function render() {
var progress;
let progress;

animatestep = Math.max(0, Math.min(240, toend ? animatestep+1 : animatestep-4));
acceleration = easing(animatestep, 0, 1, 240);
Expand Down
4 changes: 2 additions & 2 deletions src/interface/desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const schema = {
};

let syncing = false;
var state = {}
let state = {}
const store = new Store({ schema });

console.log(store);
Expand Down Expand Up @@ -374,7 +374,7 @@ const createWindow = (tab = 'chat.html') => {
firstRun = false;

// Create splash screen
var splash = new BrowserWindow({width: 400, height: 400, transparent: true, frame: false, alwaysOnTop: true});
let splash = new BrowserWindow({width: 400, height: 400, transparent: true, frame: false, alwaysOnTop: true});
splash.setOpacity(1.0);
splash.setBackgroundColor('#d16b4e');
splash.loadFile('splash.html');
Expand Down
2 changes: 1 addition & 1 deletion src/khoj/interface/web/assets/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Toggle the navigation menu
function toggleMenu() {
var menu = document.getElementById("khoj-nav-menu");
let menu = document.getElementById("khoj-nav-menu");
menu.classList.toggle("show");
}

Expand Down
Loading