Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasElkalla authored Jan 4, 2023
1 parent 2a7477c commit a2be4cc
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,18 +247,15 @@ if (!window.localStorage.getItem("URLs")) {
window.localStorage.setItem("URLs", JSON.stringify([]));
window.localStorage.setItem("usageToday", JSON.stringify([]));
}
window.addEventListener("load", function () {
const shortUrl = new Short();
console.log(shortUrl);
shortUrl.history.addEventListener(
"click",
shortUrl.getHistory.bind(shortUrl)
);
shortUrl.form.addEventListener("submit", function (e) {
e.preventDefault();
console.log(this);
shortUrl.submitF();
});
shortUrl.refresh.addEventListener("click", shortUrl.refreshF.bind(shortUrl));
shortUrl.icon.addEventListener("click", shortUrl.openIcon.bind(shortUrl));
// window.addEventListener("load", function () {
const shortUrl = new Short();
console.log(shortUrl);
shortUrl.history.addEventListener("click", shortUrl.getHistory.bind(shortUrl));
shortUrl.form.addEventListener("submit", function (e) {
e.preventDefault();
console.log(this);
shortUrl.submitF();
});
shortUrl.refresh.addEventListener("click", shortUrl.refreshF.bind(shortUrl));
shortUrl.icon.addEventListener("click", shortUrl.openIcon.bind(shortUrl));
// });

0 comments on commit a2be4cc

Please sign in to comment.