diff options
Diffstat (limited to 'utils/cleanupwikipages.el')
-rw-r--r-- | utils/cleanupwikipages.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/cleanupwikipages.el b/utils/cleanupwikipages.el new file mode 100644 index 0000000..0066db5 --- /dev/null +++ b/utils/cleanupwikipages.el @@ -0,0 +1,18 @@ +;; Superdummy function to clean up a wiki page. +;; It removes the menu on the left and the navigation bar. +;; +;; TODO: don't remove the Wikipedia logo. + +(defun cleanupwikipages () + "Clean up wiki pages." + (interactive) + (widen) + (goto-char (point-min)) + (search-forward "NewPP" nil t) + (search-forward "-->\n" nil t) + (let ((beg (point)) + (end (save-excursion (and (re-search-forward "</body>" nil t) + (match-beginning 0))))) + (delete-region beg end))) + + |