Coder Social home page Coder Social logo

seankilleen / unanet-summarizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from excellalabs/unanet-summarizer

1.0 2.0 0.0 5.19 MB

A JavaScript module that powers a bookmarklet to summarize some time-keeping helpers.

JavaScript 3.75% CSS 0.39% HTML 57.31% TypeScript 38.54%

unanet-summarizer's Introduction

unanet-summarizer

Latest Build Deployment
Build Status Deployment Status

A JavaScript file that powers a bookmarklet to summarize some time-keeping helpers.

screenshot of the tool in action

Get the Bookmarklet

Drag this link to your browser's bookmarks or bookmark toolbar (you can then rename the title to what you want)

Summarize Unanet

How the tool works

  • This script scrapes the DOM for the time entries and places them into an array
  • It then uses several reducers to summarize the time in various ways
  • It uses some rudimentary string templates to put together some contents
  • It then puts those contents into a new document which it opens in a new tab.

Once you add the bookmarklet, you can click it while you're editing a Unanet timesheet and see the summary.

How We're Deploying This

  • We first developed a JavaScript that could be executed in the browser's console
  • We then served that from GitHub pages (thanks, GitHub!)
  • We then created a bookmarklet that can load the script and execute it

Explaining the Bookmarklet

The contents of the link are:

javascript:(function(){ var onload=function(){ window.summarizeUnanetTime(); }; if(!window.summarizeUnanetTime){var s=document.createElement('script');s.src='https://excellalabs.github.io/unanet-summarizer/unanet-summarizer.js';s.onload=onload;document.body.appendChild(s)} else { onload(); } })();

This bookmarklet adds injects the JavaScript file if it doesn't exist, and then calls the summarizeUnanetTime() function that it contains.

For Developers

How to build locally

  • Pull this repository
  • npm install gets the dependencies
  • npm run build builds & outputs to dist folder

How to test locally

  • npm start allows you to view a bookmarklet for debug that you drag to your bookmarks bar
  • open unanet
  • edit a timesheet
  • click the debug bookmarklet

unanet-summarizer's People

Contributors

seankilleen avatar dependabot-preview[bot] avatar jmweir avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.