Code Monkey home page Code Monkey logo

ep_author_hover's Introduction

Publish Status Backend Tests Status

Show Author Name on hover

Hover over an author to see their name

Other functionality

Shows the author color on hover Supports fast switching between hovers (Doesn't depend on native browser support)

Settings

Disable/enable author hover locally in your browser

This plugin adds a new switch called Show Author on Hover to the settings menu. This allows you to disable/enable the display of author names on hover in your browser.

Disable author hover by default for all clients

To don't show the author names on hover by default (the user has to activate in manually), add the following to your setting.json:

  // disable author hover by default
  "ep_author_hover": {
    "disabledByDefault": true
  }

Why did I rewrite this?

I don't really like plugins that depdend on manipulating the ACE inner DOM, rewriting this plugin and using events meant I could still have hover functionality without the risk of running into nasty ACE issues down the line. It also meant that as new authors joined and updated their name I could update hte hovers in real time. Previous attempts at writing this plugin have required a browser refresh to know who authors are, that wasn't good enough for me.

TODO

  • use JQTip
  • Your ideas here..
  • Test in IE
  • Settings for font size/background color switch
  • Your sponsorship here..

ep_author_hover's People

Contributors

amfl avatar apmole avatar bit-marcink avatar dependabot[bot] avatar falkirks avatar github-actions[bot] avatar johnmclear avatar ldidry avatar lgtm-migrator avatar ovari avatar rhansen avatar rittmeier avatar samtv12345 avatar translatewiki avatar woeterman94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ep_author_hover's Issues

[Question] Unusual behaviour with new version

System

OS: Windows as well as iOS and Linux
Browser: Firefox 76
Etherpad: Version 1.8.3

Problem Description

Hover shows directly and follows the mouse. With this, it always shadows text and distracts from writing and reading. We (10 users) really don't like the new functionality. The old functionality worked way better for us. Maybe the hover should show after 2 seconds, in the old version it maybe took a bit too long.

Possible solution

Restore old functionality with shorter delay or put the hover to the right side of the pad.

creation of locales to help to translate

Hi, thank you for this plugin, it is very useful to know at first glance who wrote a sentence.

It seems that label name is always in english, is it possible to put it in locale file to allow contributors to translate it?

In french, it would be translated into "Afficher l'auteur en surimpression".
Thank you. :)

Show date of change with author_hover

Hello,

is it possible to get, convert and show the timestamp of each author?
Could do it myself it I get some hint`s for the functions and code.

thanks
Birgit

error with etherpad 1.8.3

Hi, after updating to etherpad 1.8.3 (and updating all plugins) i got this error Failed to load 'ep_author_hover/static/js/index' for 'ep_author_hover/ep_author_hover/client_hooks/postAceInit': Error: The module at "ep_author_hover/static/js/index" does not exist. which result in a state that the hover is never shown.

TypeError: $(...).closest(...).get(...) is undefined

I think the changes in 4569f63 are spamming my logfile.

[2015-04-06 11:01:22.687] [WARN] client - TypeError: $(...).closest(...).get(...) is undefined -- { errorId: 'UKFjC9yiVwmBQ91hw90b',
  msg: 'TypeError: $(...).closest(...).get(...) is undefined',
  url: 'REDACTED',
  linenumber: 65,
  userAgent: 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0' }

authorId not properly decoded causing "Unknown Author"

Issue Description:

For this author string "author-a-z76zuz70zz81zz67zz122zgoz122zz88zz83zz75zz89zz66zz67z5" specified in html span tag, static/js/index.js wrongly decodes it to "a.LuFQCzgozXSz75", whereas the real author id should be "a.LuFQCzgozXSKYBC5". This caused this plugin to show "Unknown Author" in our etherpad lite instance.

Suggested solution:

Comment out/remove line 74 of static/js/index.js, as substring(0,49) is causing trouble in our case:
//className = className.substring(0,49);
After commenting out this line, author info was correctly shown when clicking (hovering) color highlighted lines.

Environment:

Etherpad Lite: commit 08b90437c1fdcb62609f03c6b75a9dcb43865deb (2016-08-01)
OS: Linux dev-businesstime-4 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux
ep_author_hover installed by npm install: ├── [email protected]

Way to disabled hover on existing text

Would be good if you had a way to disable the hover on existing text and a way to disable the hover all together.

The hover on existing text causes some readability problems and issues on phones. Maybe a way to address this would be to only show hover on text when the mouse has been hovering for a few seconds.

The ability to disable the hover altogether would be good to give the option to the end users.

Thanks

"Me" not shown on hover

When hovering over a text part I get this error:

Could not find string ep_author_hover.unknow_author html10n.js:742:34
TypeError: authorName is undefined
anonymous/<["ep_author_hover/static/js/index.js"]/showAuthor.draw()
 require-kernel.js line 226 > Function:137
anonymous/<["ep_author_hover/static/js/index.js"]/showAuthor.show()
 require-kernel.js line 226 > Function:71
anonymous/<["ep_author_hover/static/js/index.js"]/showAuthor.hover/timer<()
 require-kernel.js line 226 > Function:59
 require-kernel.js line 226 > Function:137:5
Syntax-Fehler

Firefox 46.0.1
Etherpad 1.6

Add background color

Usually I can't read the names because the hover appears over some other text.
Adding a background color to the div may helb to make the names readable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.