;;; +xkcd.el -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:

(require 'xkcd)

(defun +xkcd-get-from-url (url &rest _)
  "Open XKCD from URL."
  (if (string-match "xkcd\\.com/\\([0-9]+\\)" url)
      (xkcd-get (string-to-number (match-string 1 url)))
    (funcall +browse-url-browser-function url)))

(provide '+xkcd)
;;; +xkcd.el ends here
