anchor.diff:                      (hooks:add-hook (buffer-loaded-hook (buffer mode))
                                       (make-activate-content-scripts-handler mode content-script-name))
                       (push content-script-name (handler-names mode)))))))
  -
  -(defun read-png-as-base64 (png-file)
  -  (let ((arr (make-array 0 :element-type '(unsigned-byte 8) :adjustable t :fill-pointer t)))
  -    (with-open-file (png png-file :element-type '(unsigned-byte 8))
  -      (loop for byte = (read-byte png nil nil)
  -            while byte
  -            do (vector-push-extend byte arr)
  -            finally (return (base64:usb8-array-to-base64-string arr))))))
  -
  -(defun make-extension-icon (icons-json extension-directory extension-name)
  -  (format nil "<img src=\"data:image/png;base64,~a\" alt=\"~a\"
  -height=~a/>"
  -          (read-png-as-base64
  -           (uiop:merge-pathnames* (rest (first icons-json)) extension-directory))
  -          extension-name
  -          (- (nyxt:height (status-buffer (current-window))) 10)))
   
   (export-always 'load-web-extension)
   (defmacro load-web-extension (lispy-name directory)
  
positive.code:      :js-files (uiop:ensure-list js)
       :css-files (uiop:ensure-list css))))
  
  (define-mode extension ()
    "The base mode for any extension to inherit from."
    ((name (error "Extension should have a name")
  
negative.code:           (version ,(alex:assoc-value json :version))
            (description ,(alex:assoc-value json :description))
            (extension-directory ,directory)
            (homepage-url ,(alex:assoc-value json :homepage--url))
            (browser-action ,(make-browser-action json))
            (content-scripts (list ,@(mapcar (lambda (content-script-alist)
                                               (apply #'make-content-script
                                                      (alex:alist-plist content-script-alist)))
                                             (alex:assoc-value json :content--scripts))))))
         (defmethod initialize-instance :after ((extension ,lispy-name) &key)
           (setf (nyxt:glyph extension)
                 (setf (default-icon (browser-action extension))
                       (encode-browser-action-icon (quote ,json) ,directory)))))))
  