ep_cursortrace
Advanced tools
Comparing version 2.0.10 to 2.0.11
@@ -11,3 +11,4 @@ { | ||
"aceEditEvent": "ep_cursortrace/static/js/main:aceEditEvent", | ||
"handleClientMessage_CUSTOM": "ep_cursortrace/static/js/main" | ||
"handleClientMessage_CUSTOM": "ep_cursortrace/static/js/main", | ||
"documentReady":"ep_cursortrace/static/js/main" | ||
}, | ||
@@ -14,0 +15,0 @@ "hooks": { |
{ | ||
"name": "ep_cursortrace", | ||
"description": "Show cursor/caret movements of other users in real time", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>", | ||
"repository":"git@github.com:redhog/ep_cursortrace.git", | ||
"contributors": [{ | ||
@@ -7,0 +8,0 @@ "name": "John McLear", |
@@ -1,4 +0,10 @@ | ||
# ep_cursortrace | ||
Etherpad plugin to trace the cursor of other users in real time. Shows the caret position of the authors on your Pad. | ||
# Show the caret position of authors on your Etherpad um, Pad. | ||
Important: A caret is not a cursor, a cursor is what your mouse uses.. A caret is the little stick used in a word processor. The more you know.... | ||
## Features | ||
* See where the author is in really real time | ||
* Click on an authors colored icon block to follow that author as they move around a pad | ||
* I needed a third feature so let's go with free NFC Ring for anyone who spots this crazy "feature" | ||
## TODO | ||
@@ -12,4 +18,8 @@ | ||
* Test Coverage | ||
* Show the authors location (When in follow mode) even if the author doesn't type anything (means storing authors last known locations) | ||
## Get it done | ||
Contact the developers through github to sponsor development of bugfixes and features |
@@ -5,3 +5,25 @@ var initiated = false; | ||
var globalKey = 0; | ||
var isFollowing = false; | ||
exports.documentReady = function(){ | ||
// Set the title | ||
$('body').on('mouseover', '#otheruserstable > tbody > tr > td > div', function(){ | ||
$(this).css("cursor", "pointer"); | ||
$(this).attr("title", "Watch this author"); | ||
}); | ||
// Watch / follow a user | ||
$('body').on('click', '#otheruserstable > tbody > tr > td > div', function(){ | ||
// already watching so stop watching | ||
if($(this).hasClass("buttonicon-clearauthorship")){ | ||
$(this).removeClass("buttonicon buttonicon-clearauthorship"); | ||
isFollowing = false; | ||
}else{ | ||
isFollowing = $(this).parent().parent().data("authorid"); | ||
$(this).addClass("buttonicon buttonicon-clearauthorship"); | ||
$(this).css({"font-size":"12px","color":"#666"}); | ||
} | ||
// watchUser.toggle(); | ||
}); | ||
} | ||
exports.aceInitInnerdocbodyHead = function(hook_name, args, cb) { | ||
@@ -186,3 +208,3 @@ args.iframeHTML.push('<link rel="stylesheet" type="text/css" href="../static/plugins/ep_cursortrace/static/css/ace_inner.css"/>'); | ||
divMargin = divMargin.replace("px", ""); | ||
console.log("Margin is ", divMargin); | ||
// console.log("Margin is ", divMargin); | ||
divMargin = parseInt(divMargin); | ||
@@ -223,2 +245,13 @@ if((divMargin + innerdocbodyMargin) > 0){ | ||
$(outBody).append($indicator); | ||
// Are we following this author? | ||
if(isFollowing && isFollowing === value.userId){ | ||
// scroll to the authors location | ||
var $inner = $('iframe[name="ace_outer"]').contents().find("#outerdocbody"); | ||
var newY = top + "px"; | ||
$inner.scrollTop(newY); // works in Chrome not FF | ||
$inner.animate({scrollTop: newY}); | ||
} | ||
@@ -313,3 +346,3 @@ // After a while, fade it out :) | ||
else { // recursion FTW! | ||
console.log("recursion"); // IE handles recursion badly | ||
// console.log("recursion"); // IE handles recursion badly | ||
$(this).html(wrap($(this), key)); // This really hurts doing any sort of count.. | ||
@@ -316,0 +349,0 @@ newtarget.append($(this)); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
19185
466
25