ep_cursortrace
Advanced tools
Comparing version 3.0.5 to 3.0.6
{ | ||
"name": "ep_cursortrace", | ||
"description": "Show cursor/caret movements of other users in real time", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>", | ||
@@ -6,0 +6,0 @@ "repository":"git@github.com:redhog/ep_cursortrace.git", |
@@ -5,6 +5,6 @@ # Show the caret position of authors on your Etherpad um, Pad. | ||
Looking for the follow feature? See ep_author_follow | ||
## 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" | ||
* See where another authors caret is in really real time | ||
@@ -21,6 +21,4 @@ ## TODO | ||
* 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 |
var initiated = false; | ||
var last = undefined; | ||
var globalKey = 0; | ||
var isFollowing = false; | ||
exports.documentReady = function(){ | ||
// Set the title | ||
$('body').on('mouseover', '#otheruserstable > tbody > tr', function(){ | ||
$(this).css("cursor", "pointer"); | ||
$(this).attr("title", "Follow this author"); | ||
}); | ||
// Watch / follow a user | ||
$('body').on('click', '#otheruserstable > tbody > tr', function(){ | ||
// already watching so stop watching | ||
if($(this).hasClass("buttonicon-clearauthorship")){ | ||
$(this).find("td > div").removeClass("buttonicon buttonicon-clearauthorship"); | ||
isFollowing = false; | ||
}else{ | ||
isFollowing = $(this).data("authorid"); | ||
$(this).find("td > div").text("👁"); | ||
$(this).find("td > div").css({"font-size":"12px","color":"#666","line-height":"17px","padding-left":"3px"}); | ||
} | ||
// watchUser.toggle(); | ||
}); | ||
} | ||
@@ -241,17 +222,2 @@ | ||
// Are we following this author? | ||
if(isFollowing && isFollowing === value.userId){ | ||
// scroll to the authors location | ||
var $inner = $('iframe[name="ace_outer"]').contents().find("#outerdocbody"); | ||
if(top < 30) top = 0; // top line needs to be left visible | ||
var newY = top + "px"; | ||
var $outerdoc = $('iframe[name="ace_outer"]').contents().find("#outerdocbody"); | ||
var $outerdocHTML = $('iframe[name="ace_outer"]').contents().find("#outerdocbody").parent(); | ||
// works on earlier versions of Chrome (< 61) | ||
$outerdoc.animate({scrollTop: newY}); | ||
// works on Firefox & later versions of Chrome (>= 61) | ||
$outerdocHTML.animate({scrollTop: newY}); | ||
} | ||
// After a while, fade it out :) | ||
@@ -258,0 +224,0 @@ setTimeout(function(){ |
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
16944
421
23