]> git.ardis.lu - ardislu.dev/commitdiff
Simplify querySelector on edit button
authorArdis Lu <ardisglu@gmail.com>
Sun, 14 Aug 2022 06:08:54 +0000 (23:08 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 14 Aug 2022 06:08:54 +0000 (23:08 -0700)
script.js

index 9f9cd521129209cf7492d1d90a209ff155e6391c..2c3036750f091785c4a4a5fbb7b830f2a5fd0a30 100644 (file)
--- a/script.js
+++ b/script.js
@@ -119,7 +119,7 @@ function setPageMetadata(values) {
   document.querySelector('meta[property="og:title"]').content = values.title;
   document.querySelector('meta[property="og:description"]').content = values.description;
   document.querySelector('meta[property="og:url"]').content = `https://ardislu.dev${values.path}`;
-  globalThis.components.get('header').querySelector('#edit').href = values.editUrl;
+  document.querySelector('#edit').href = values.editUrl;
 }
 
 /* Implement client-side routing. Handles view logic for /home and /:post routes. */
This page took 0.04848 seconds and 4 git commands to generate.