From 8f24c5ff6a3bcbb4b5e1bbe129c2365691554827 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 19 Mar 2016 19:32:35 -0700 Subject: [PATCH] Tests --- content.js | 3 +-- jp/dictionary.js | 23 +++++++++++++++++++++++ manifest.json | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 jp/dictionary.js diff --git a/content.js b/content.js index d87589ac..f2aa49a2 100644 --- a/content.js +++ b/content.js @@ -16,7 +16,6 @@ * along with this program. If not, see . */ - function getRangeAtCursor(e, lookAhead) { const range = document.caretRangeFromPoint(e.clientX, e.clientY); if (range === null) { @@ -52,4 +51,4 @@ function onMouseDown(e) { } -window.addEventListener('mousemove', onMouseMove, false); +window.addEventListener('mousedown', onMouseDown, false); diff --git a/jp/dictionary.js b/jp/dictionary.js new file mode 100644 index 00000000..42825fa3 --- /dev/null +++ b/jp/dictionary.js @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2016 Alex Yatskov + * Author: Alex Yatskov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +class Dictionary { + + +} diff --git a/manifest.json b/manifest.json index 15cbd330..79258d34 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "content_scripts": [{ "matches": [ "http://*/*", "https://*/*" ], - "js": [ "content.js" ], + "js": [ "jp/dictionary.js", "content.js" ], "run_at": "document_end" }] }