From 60d7eec53f9c2cf0a5ccf4c895a9b6a960c2ebcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sat, 9 Apr 2022 17:43:37 +0100 Subject: [PATCH] Add typescript-language-server --- flake.nix | 2 ++ guangdong/extract-urls.js | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index d801027..5a4daa6 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,8 @@ in { devShell = pkgs.mkShell { nativeBuildInputs = with pkgs; [ + nodePackages.typescript-language-server + (python39.withPackages (pypkgs: with pypkgs; [ beautifulsoup4 diff --git a/guangdong/extract-urls.js b/guangdong/extract-urls.js index 7081ecb..94e2824 100644 --- a/guangdong/extract-urls.js +++ b/guangdong/extract-urls.js @@ -15,17 +15,17 @@ * @param {string} fileName - The filename to give the file */ function downloadString(text, fileType, fileName) { - var blob = new Blob([text], { type: fileType }); + var blob = new Blob([text], { type: fileType }); - var a = document.createElement('a'); - a.download = fileName; - a.href = URL.createObjectURL(blob); - a.dataset.downloadurl = [fileType, a.download, a.href].join(':'); - a.style.display = "none"; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - setTimeout(function() { URL.revokeObjectURL(a.href); }, 1500); + var a = document.createElement('a'); + a.download = fileName; + a.href = URL.createObjectURL(blob); + a.dataset.downloadurl = [fileType, a.download, a.href].join(':'); + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + setTimeout(function() { URL.revokeObjectURL(a.href); }, 1500); } /**