Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
BaseMax authored Sep 9, 2024
1 parent 3d5fbf1 commit 046b4b5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions script/script.js
Original file line number Diff line number Diff line change
@@ -7,9 +7,6 @@ const elm_iframe = document.querySelector('.iframe');

// Const variables
const args = ['code', ''];
const DEFAULT_CODE = `صفحه:
محتوا = «سلام دنیا»
تمام`;

// Variables
let isReady = false;
@@ -109,21 +106,15 @@ elm_code.addEventListener("input", () => {
});

window.addEventListener('load', () => {
let hasCode = false;
elm_code.focus();

if (localStorage.getItem("cache-code")) {
elm_code.value = localStorage.getItem("cache-code").toString().trim();

if (elm_code.value !== '') {
hasCode = true;

runSalam(false);
}
}

if (!hasCode) {
elm_code.value = DEFAULT_CODE;
}
});

// Init

0 comments on commit 046b4b5

Please sign in to comment.