ep_author_hover
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -9,3 +9,3 @@ { | ||
"description": "Adds author names to span titles (shows on hover), works as authors change their name. Hover includes author color and fast switching between author spans. Hat tip to Martyn York for the initial work on this.", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
@@ -63,3 +63,5 @@ var _ = require('ep_etherpad-lite/static/js/underscore'); | ||
if(clientVars.plugins.plugins.ep_author_hover.enabled){ | ||
var authorId = showAuthor.authorIdFromClass($(span.target).closest('span').get(0).className); // Get the authorId | ||
var authorTarget = $(span.target).closest('span').get(0); | ||
if (!authorTarget){ return; } // We might not be over a valid target | ||
var authorId = showAuthor.authorIdFromClass(authorTarget.className); // Get the authorId | ||
if(!authorId){ return; } // Default text isn't shown | ||
@@ -130,5 +132,10 @@ showAuthor.destroy(); // Destroy existing | ||
var outBody = $('iframe[name="ace_outer"]').contents().find("body"); | ||
var lt = /</g, | ||
gt = />/g, | ||
ap = /'/g, | ||
ic = /"/g; | ||
authorName = authorName.toString().replace(lt, "<").replace(gt, ">").replace(ap, "'").replace(ic, """); | ||
var $indicator = $("<div class='authortooltip' style='opacity:.8;font-size:14px;padding:5px 5px 0px 5px;position:absolute;left:"+left+"px;top:"+top +"px;background-color:"+authorColor+"' title="+authorName+">"+authorName+"</div>"); | ||
$(outBody).append($indicator); | ||
// After a while, fade out | ||
@@ -135,0 +142,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
7719
160