From 77817e633cdcd47d6eb7219dfe44a01c09488d19 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 17 Nov 2008 21:00:04 -0500 Subject: [PATCH] get version 0.2 working --- keyboard_navigation.js | 16 +++++++++------- keyboard_navigation.php | 7 ++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/keyboard_navigation.js b/keyboard_navigation.js index 7b1c11f..4f0103b 100644 --- a/keyboard_navigation.js +++ b/keyboard_navigation.js @@ -15,7 +15,7 @@ KeyboardNavigation.get_hrefs = function(fields, admin_mode) { while (top_node) { if (top_node.href) { found_properties[key] = top_node.href; is_found = true; - if (admin_mode) { + if (highlight_selectors) { var highlight_a = new Element("a", { "title": key + ": " + instructions, "href": top_node.href, "style": "display: block; position: absolute; border: solid #f00 1px; background-color: #ff0; z-index: 1" }); highlight_a.setOpacity(0.5); highlight_a.clonePosition(top_node); @@ -33,12 +33,14 @@ KeyboardNavigation.get_hrefs = function(fields, admin_mode) { } } - if (missing_properties.length > 0) { - var message = "[Keyboard Navigation] Missing selectors:\n\n" + missing_properties.join("\n"); - if (top.console) { - top.console.log(message); - } else { - alert(message); + if (highlight_selectors) { + if (missing_properties.length > 0) { + var message = "[Keyboard Navigation] Missing selectors:\n\n" + missing_properties.join("\n"); + if (top.console) { + top.console.log(message); + } else { + alert(message); + } } } diff --git a/keyboard_navigation.php b/keyboard_navigation.php index f65922c..4c3283b 100644 --- a/keyboard_navigation.php +++ b/keyboard_navigation.php @@ -3,7 +3,7 @@ Plugin Name: Keyboard Navigation Plugin URI: http://www.coswellproductions.com/wordpress/keyboard-navigation/ Description: Attach keyboard navigation to blog entries. -Version: 0.1 +Version: 0.2 Author: John Bintz Author URI: http://www.coswellproductions.org/wordpress/ @@ -115,7 +115,7 @@ class KeyboardNavigation {
-

Keyboard Navigation Version 0.1

+

Keyboard Navigation Version 0.2

Copyright © 2008 John Bintz | Released under the GNU GPL

@@ -205,7 +205,8 @@ class KeyboardNavigation {

Keyboard Navigation requires that the visitor have JavaScript enabled. This plugin uses - the Prototype JavaScript library, and including it will increase the size of your total site download.

+ the Prototype JavaScript library, and including it will increase the size of your total site download. Additionally, + if other plugins load their own copies of the Prototype library, both plugins will break.