From 9d0c100c412bd9f51dca7baf9bafc51b1f3364b8 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 8 Feb 2020 20:14:25 -0500 Subject: [PATCH 1/2] Reverse M-< and M-> to stay consistent with Emacs --- eaf.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/eaf.el b/eaf.el index 3934f53..158c2f6 100644 --- a/eaf.el +++ b/eaf.el @@ -7,7 +7,7 @@ ;; Copyright (C) 2018, Andy Stewart, all rights reserved. ;; Created: 2018-06-15 14:10:12 ;; Version: 0.5 -;; Last-Updated: Sat Feb 8 20:06:39 2020 (-0500) +;; Last-Updated: Sat Feb 8 20:14:10 2020 (-0500) ;; By: Mingde (Matthew) Zeng ;; URL: http://www.emacswiki.org/emacs/download/eaf.el ;; Keywords: @@ -252,8 +252,8 @@ Try not to modify this alist directly. Use `eaf-setq' to modify instead." ("M-q" . "clear_all_cookies") ("C-M-q" . "clear_history") ("M-v" . "scroll_down_page") - ("M->" . "scroll_to_begin") - ("M-<" . "scroll_to_bottom") + ("M-<" . "scroll_to_begin") + ("M->" . "scroll_to_bottom") ("M-t" . "new_blank_page") ("SPC" . "insert_or_scroll_up_page") ("J" . "insert_or_goto_left_tab") @@ -338,9 +338,8 @@ Try not to modify this alist directly. Use `eaf-setq' to modify instead." ("l" . "scroll_right") ("," . "scroll_up_page") ("." . "scroll_down_page") - (">" . "scroll_to_begin") - ("<" . "scroll_to_bottom") - ) + ("<" . "scroll_to_begin") + (">" . "scroll_to_bottom")) "The keybinding of EAF Image Viewer." :type 'cons) @@ -380,8 +379,8 @@ Try not to modify this alist directly. Use `eaf-setq' to modify instead." ("C-p" . "scroll_down") ("C-v" . "scroll_up_page") ("M-v" . "scroll_down_page") - ("M->" . "scroll_to_begin") - ("M-<" . "scroll_to_bottom")) + ("M-<" . "scroll_to_begin") + ("M->" . "scroll_to_bottom")) "The keybinding of EAF RSS Reader." :type 'cons) From 2f0bc88ccdae7c0275879cf239e54a23c0c5cdac Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 9 Feb 2020 00:37:29 -0500 Subject: [PATCH 2/2] Support a tags without href --- core/js/get_markers.js | 1 + core/js/goto_marker.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/js/get_markers.js b/core/js/get_markers.js index 5fd8a74..818308a 100644 --- a/core/js/get_markers.js +++ b/core/js/get_markers.js @@ -152,6 +152,7 @@ z-index: 100000;\ let validRects = []; addElementToRects(validRects, document.links); // collect links + addElementToRects(validRects, document.querySelectorAll('a')); // collect a tag without href addElementToRects(validRects, document.querySelectorAll('input')); // collect inputs addElementToRects(validRects, document.querySelectorAll('button')); // collect buttons addElementToRects(validRects, document.querySelectorAll('[class*="btn"]')); // collect btn buttons diff --git a/core/js/goto_marker.js b/core/js/goto_marker.js index be83eb0..4b13e53 100644 --- a/core/js/goto_marker.js +++ b/core/js/goto_marker.js @@ -44,6 +44,8 @@ link.click(); } else if(link.href != undefined && link.href != '' && link.getAttribute('href') != ''){ return link.href; + } else if(link.nodeName.toLowerCase() === 'a') { + link.click(); // most general a tag without href } } return "";