Commit Graph

11713 Commits (171ef55def0a89f105dcf36ce9df557970655303)

Author SHA1 Message Date
PJ Hampton 6dd0762f54 Fix rounding errors. (#4131) 2017-04-26 12:37:33 -04:00
PJ Hampton cf836164e3 Remove alert 2017-04-26 15:41:02 +00:00
PJ Hampton 0841eae4e4 Update binding. 2017-04-26 15:39:13 +00:00
PJ Hampton 9644a7da63 Pushing code to gh for mool. 2017-04-26 14:48:59 +00:00
PJ Hampton 251996822d Checking in code. 2017-04-25 19:51:30 +00:00
Zaahir Moolla f1142a6b21 tighten calculator regex, update tests (#4128) 2017-04-25 10:43:32 +01:00
PJ Hampton e2212caac3 Stashing. 2017-04-25 09:05:44 +00:00
Zaahir Moolla 2fc4732de5 Fix Goodie ID in JS (#4126) 2017-04-24 17:36:05 -04:00
Zaahir Moolla abb63d9cd4 Ensure filenames don't contain spaces (#4125) 2017-04-24 16:11:35 -04:00
Zaahir Moolla aad29332d0 Fix geometry test 2017-04-24 15:42:03 -04:00
Brian Singer c5816891e4 Geometry Spice converted to Goodie: Broken hover and missing calculation feature (#3181)
* Geometry Broken Hover and missing calc

* Linked hover effect for dot and SVG

* updated css

* started test file

* consolidated objectInfo YML and finished testing

* removed dumeprs

* fixed triggering and added more triggering test cases
2017-04-24 15:41:31 -04:00
Manraj Singh 67f6e084f2 AsciiTable: Improves triggering (#4124)
* AsciiTable: Triggering now for 'list of'

* AsciiTable: Add more triggers

* AsciiTable: Tests updated with new triggers
2017-04-24 15:35:38 -04:00
Zaahir Moolla aa882165fa Merge branch 'pjhampton/PercentOf_remove'
* pjhampton/PercentOf_remove:
  Remove PercentOf files.
2017-04-24 15:33:41 -04:00
Zaahir Moolla f70ed1e6fc Merge branch 'master' into pjhampton/PercentOf_remove
* master:
  Calculator: Fix copy issue, remove -Infinity (#4095)
  Added PercentOf logic to calculator. (#4122)
  Conversions: Improve triggering (#4118)
  Countdown: Continue PR #3485 (#3936)
2017-04-24 15:33:26 -04:00
PJ Hampton 433401b288 Stashing. 2017-04-24 19:13:40 +00:00
PJ Hampton 31597d87b4 Calculator: Fix copy issue, remove -Infinity (#4095)
* Removed backspace with 'c' key to allow copying.

* Restart if result is -Infinity

* remove trailing space

* Detect metakey

* Fixed merge conflict.

* Fixed copy and paste issue with calculator

* Fixed copy and paste issue with calculator

* Accounts for ctrl key

* Fix handling of shift/ctrl/cmd keys

* remove trailing spaces

* more robust, simple cross browser keyboard handling

* add shortcuts for functions, replace c with cos

* Updated comments.
2017-04-24 19:40:59 +01:00
PJ Hampton 3ea2787742 Added PercentOf logic to calculator. (#4122) 2017-04-24 12:59:03 -04:00
PJ Hampton 07bf054914 Remove PercentOf files. 2017-04-24 16:06:42 +00:00
Aditya Tandon 40d7231443 Conversions: Improve triggering (#4118)
* Fixes #4112 conversions triggering

* test added 1

* adds alias for fahrenheit
2017-04-24 17:02:25 +01:00
PJ Hampton 403b601224 Moot stashing. 2017-04-24 15:37:33 +00:00
Rasika Pohankar 7ebdcdfbd2 Countdown: Continue PR #3485 (#3936)
* Implement changed design, fix #3500

* Remove comment

* Update test file to use ISO8601 dates and avoid testing of Role

* Include subtitle in the template

* Take current time using momentjs, calculate difference in JS

* Remove subtitle from the template, make corrections to endCountdown

* Pass date string to JS and find difference in moment objects, change toggling at countdown end

* Remove use of difference passed from the backend

* Update test file
2017-04-24 09:40:05 -04:00
PJ Hampton 6db6ca6487 Add initial ui. 2017-04-22 22:07:40 +00:00
lernae cc1753acab Fixes #4102 Calendar: Shouldn't trigger on query for calendar.google.com (#4114) 2017-04-21 18:29:13 -04:00
Aditya Tandon 1047f8a9e6 ASCII Table: Add additional trigger words (#4111)
* Fixes #4107 Added triggers

* updating test

* moving triggers to a separate file
2017-04-21 18:15:49 -04:00
PJ Hampton 2e6590e29f Calculator: [Phase 4] Deprecate Perl Backend (#4110)
* Begin deprecating perl backend.

* Deprecate backend [skip ci]

* Routine checkin of code.

* Added docs + preprocessing.

* Deprecate perl eval backend.

* Checking in some code.'

* Handle bad search expressions by defaulting to 0

* Add ability to recover with grace from bad expressions from search bar.

* Removed unnessesary perl code.

* Add support for factorials with !

* cleanup trailing spaces

* Removed trig constants.

* Support tau in expression.

* Removed ln preprocess.

* Support leading =. Removed moot code.

* Add support for euro and pound.

* Removed nat lang query parsing from js.

* strip duplicate operators

* Fixed legacy spacing issue in tests.

* Remove empty exponent.

* Bail on hex looking entries.

* better handling of repeated operators

* Remove max import

* revert back to old check for 3+ operators

* relax phone number regex for now

* remove silly test
2017-04-21 13:12:41 -04:00
Emily Tackett b9e7ad1888 Unicode: Make '+' character in unicode codepoint query optional. (#4101)
* Made + in unicode codepoint queries optional

* Added test for optional + in codepoint query
2017-04-19 22:53:25 -04:00
PJ Hampton 99f0ea0f09 Calculator: Update / Refactor Percent Normalizer (#4106)
* Update Percent Normalizer.

* Removed numerical restrictions.

* Update regex.

* Allow addition of float percents.

* Remove console.log
2017-04-19 22:50:28 -04:00
Zaahir Moolla d71b7c4eb7 use strings to prevent handling 0 as false (#4109) 2017-04-18 21:10:22 +01:00
PJ Hampton b2b7ae46f2 Calculator: Support multi factorial operations (#4105)
* Support multi factorial / refactor.

* Bail if following an operand.
2017-04-18 13:50:40 -04:00
Zaahir Moolla c8aef411bb Calculator: Allow user-select on history ledger, Add support for Numpad (#4108)
* Allow user-select on history ledger

* Add support for numpad keys
2017-04-18 18:08:51 +01:00
Nalin Bhardwaj f280d574f4 Sunrise: Handles "at date" queries (#4082)
* quickfix adding at queries

* Added tests
2017-04-14 09:05:18 -04:00
Zaahir Moolla 5ce2486225 remove float, breaks Safari 2017-04-13 21:52:10 -04:00
PJ Hampton 7d021663f6 Calculator: Update signal (#4090)
* Update signal.

* Updated calculator signal.

* replace semi-colon with comma
2017-04-13 17:19:45 -04:00
Manraj Singh 9005c0c1fd UrlEscapeCodes: New Url Escape Codes Table Goodie (#4088)
* UrlEscapeCodes: Goodie initialzied

* UrlEscapeCodes: Front end created

* UrlEscapeCodes: Adds tests
2017-04-13 16:06:15 -04:00
Zaahir Moolla 3c784f2582 Calculator: Mobile CSS, Corrected Trig Functionality (#4087)
* Enable history panel on mobile

* Namespace CSS rules, remove trailing spaces

* namespace all css rules

* cleanup indentation

* remove pete's css hacks

* Namespace additional css rules

* left align calculator with search box

* Implement full width mobile UI

* remove unused css

* remove unused ids

* Beter handling of history col for small screens

* Switch back to using on methd

* Fix trig regex and evaluation, remove precision

* Ensure subtitle overflows on left, prevent history item overflow

* Prevent subtitle text from being clipped

* Remove evalmath obj

* Updated conditional

* Add support for numpad period

* Fixed on start clear.

* Add postfix detection. Fixed infinity ledger.

* Removed Factorial BigNum hacks.

* Removed unnessesary code introduced.

* Fixed shift / clear issue.

* Remove undefined key strokes.

* Fix pi in exponents.

* Make return consistent.

* Fix broken history

* Apply user-select rules to desktop and mobile

* cleanup trailing spaces, commented out css

* Fix backspacing issue with operands.

* Remove console logs
2017-04-13 13:06:53 -04:00
Zaahir Moolla 5f7defa0df Update PULL_REQUEST_TEMPLATE.md 2017-04-13 13:06:13 -04:00
PJ Hampton 0abd6a6554 Calculator: [Phase 2] Add Scientific calculator (#4067)
* Phase 1: Add basic calculator

* Updated tests.

* change template name, use base template, prefill calc with answer

* fix test

* Added backlog features.

* Updated js.

* Light refactoring work

* Refactored keycodes.

* Updated C button.

* Rewrote (+/-)% Expressions

* Updated the spacing dertermination

* Added expression to UI by default.

* Update tests.

* Updated formatting.

* Rewrite percent queries.

* Pushing updated codebase.

* Add calculator as trigger word

* Update tests for new triggers

* Stop initializing expression if 0

* add precision support to math eval object.

* Removed scientific buttons / history for Phase 1

* Updated math type.

* Prevents duplicate OPERADNS

* Add duplicate functionality.

* Updated unicode.

* Removed es6 feature.

* Stop first entry being an operand.

* Add operator flipping.

* Added Precision support.

* Handle numpad operator keys

* Set and maintain focus, Improved event handling

* Bind click handler in loop, stopPropgation of keydown

* Cleanup trailing spaces

* Fixed broken assignment.

* Prevent multiple commas.

* Fixed calculator stalling when trying to enter a new operator

* Initial refactor.

* Refactored out expression array.

* Refactored out display var.

* reintroduced matheval object for precision.

* Cleaned up formatting.

* Removed commify.

* Initial PR for Phase 2

* Add support for brackets.

* Added support for Pi

* Add support for sin, tan, cos

* Added factorial support

* Add support for squared / cubed functions

* Add support for natural log

* Support log_10 function.

* Add support for square roots.

* Add eulers number.

* Implement Engineers Exponent / Formatted Funcs.

* Add sci-tab id to handlebars.

* Removed positioning for mobile display.

* Custom exponents 🚀

* Implemented Euler exponent

* Support 1/x button.

* Interactified deg/rad toggle.

* Add support for degrees / radians

* Fix radians bug.

* Zaahirs / Mintsofts syntactic changes.

* Fixed regex for exponents

* Removed blue from toggle.

* Allow backspacing through functions.

* Allow backspacing through exponents.

* Fix +99% bug.

* Allow flipping of keypads.

* Stop ! being entered first.

* Stop EE being entered at start or multiple.

* Allow step back through EE

* Disallow multiple periods. [skip ci]

* Rewrote query to handle natural language.

* Addressed phase 1 feedback.

* Fixed backspace bug.

* Allow backspacing through constants.

* Add auto paren support for funcs.

* Started the commenting 💥

* Add some comments.

* Updated PercentNormalizer comment.

* Fix 0/0 Error.

* Add 'c' key support

* Fix back spacing.

* Positioned deg / rad toggle.

* Refactoring code. Stage 1.

* Added high signal.

* Add funcs for Initite/NaN

* Moved eval info into separate function.

* Abstracted clear function.

* Add paren manager.

* Refactored out paren state.

* Refactored out parenState global

* Removed meta.

* Backspace through functions.

* Set signal to high.

* Fixed signal

* Pushing updated code.

* Refactored backspacing.

* Fix up messy code / document.

* Fixed + percent bug.

* Support EE on mobile.

* opens pseudo paren for 1/(x)

* Fix large factorial issue.

* Allow pi | e as exponent.

* use exponents on π and e.

* Removed +-3 issue.

* Natural log and log now work as exponents

* nit: cleaned up expression.

* Fixed percent error.

* Add phase 3 ledger span (hidden)

* Disabled add digits.

* Check in UX fixes.

* Some light refactoring.

* Swap functions.

* Fixed shoddy regex.

* Add ledger object for phase 3.

* Updated percentage / trig regex

* Add blank expression if error.

* Allow factorial on decimals.

* Update code + comments.

* Add in calc trigger word. Fixed Backspace.

* All backspacing fixed.

* Try to recover from open/unfinished exponent

* Add high signal for

* Update comments.

* Updated comments.

* improve calculator regex

* Strip trailing spaces`

* Updated signal code.

* Fixed backspacing issue.

* swap id for class (ParenManger)

* Remove console logs.

* Update comment.

* Fix bug in regex replacement.

* Calculator: [Phase 3] Add History / Calc reloading (#4081)

* Set up UI.

* Phase 3 implemented.

* Remove array. Replace with handlebars.

* strip commas by default.

* Fixed html interpolation

* Add g flag to replacement regex

* Strip trailing spaces

* remove unneeded option from perl

* Added comments to backspace.

* Removed ledger properties. Updated using state.

* Addressed Zaahir's p2 feedback
2017-04-12 15:31:12 -04:00
Nalin Bhardwaj d5f7d14c6e Music Chords: Fixes dark mode SVGs (#4083) 2017-04-12 11:21:45 +01:00
Daniel Davis 3973c837b3 DuckDuckGo Responses: Removed XMPP entry (#4084) 2017-04-12 11:05:00 +01:00
Robert Badea a67bc00ef7 HTML Entities: New HTML Entities Goodie (#4056)
* added html entities goodie

* fixed trigger

* added tests

* fixed review issues

fixed CSS classes, fixed file names, switched from JSON to YML

* fixed tests and file loading

* renamed to camel case

* deleted AsciiTable.pm

* changed to camel case

* Remove extra newlines

* Fix indentation for Beta server

* Use chompContent

* Simplify CSS

* Remove scrolling div

* Fix test

* Switch overflow control to .c-base__content div
2017-04-11 17:41:17 -04:00
Manraj Singh d1e5d9c6f5 ASCII Code: New ASCII Codes Table Goodie (#4042)
* Add: Initialized ASCII Table Goodie

* Update: Fixed content options

* Update: Title added to td tags

* Update: CSS for tables

* Fix: Makes titles more verbose in template

* Update: Tests for Ascii Table added

* AsciiTable: Fix variable name to be more generic

* AsciiTable: Improved testing of IA

* AsciiTable: Chomp the table

* AsciiTable: Add meta source

* AsciiTable: Rename table_rows -> table

* AsciiTable: Use already existing CSS

* AsciiTable: Data now contains Headers

* AsciiTable: Makes template more generic

* AsciiTable: Updated tests for checking table headers

* AsciiTable: Fix required table styling

* AsciiTable: Fix tests

* Use CSS to set chomp height

* Remove table scroll div

* Switch to List template

* Update AsciiTable.t
2017-04-11 15:30:14 -04:00
Rob Emery 264282b374 DateRole: Handling 'of' in textual date formats (#3982)
* DateRole: Adding failing test for `$nth of $month $year`

* DateRole: Now parses "7th of march 2017"

* DateRole: Adding failing test for '5 of jan 1993' (no suffix and short month)

* DateRole: Handles 5 of march

* DateRole: Now also handle "march the 30th, 2017"
2017-04-10 23:02:06 -04:00
lernae 011c78e854 Dice: Fixes #3989 Set upper limit on max dice rolls and number of sides per dice (#4078)
* Dice: Fixes #3989 Set upper limit on max dice rolls and number of sides per dice

* Minor correction on naming of constant: MAX_NUM_OF_DICE
2017-04-10 12:08:59 -04:00
Rob Emery 394cf054f3 Conversions: kB and kb (and so on) restored! (#4077)
* Conversions: Unphysical units like millibits (mb) and millibytes(mB) should be assumed as mega instead

* Conversions: Now has multiple symbols (case sensitive matches) meaning that Kb and kb both mean kilobits and KB and kB both mean kilobytes :D
2017-04-10 12:01:50 -04:00
Zaahir Moolla 44278eb98c Add dash to regex accepted characters (#4070) 2017-04-10 10:56:01 -04:00
Zaahir Moolla 71f31f7767 Revert "Remove failing test for Repo release"
This reverts commit f5c4f686f5.
2017-04-07 20:45:28 -04:00
TheSpeedyBlur f3b315dbe2 Timer: Fixing trigger (#4064)
* Added variable for non-stribbable triggers.

* Added unstripped triggers to the trigger list

* Added tests to Timer in correspondence of the new triggers

* Removed unnecessary test, added trigger words of hrs and secs and their counterparts.

* Typo fix
2017-04-07 16:28:58 -04:00
Zaahir Moolla f5c4f686f5 Remove failing test for Repo release
/cc @mintsoft -- please fix
2017-04-06 16:58:53 -04:00
Zaahir Moolla 5ac215611b remove bad test 2017-04-06 16:51:31 -04:00
PJ Hampton dc12d569c6 Calculator: [Phase 1] Add basic calculator (#4051)
* Phase 1: Add basic calculator

* Updated tests.

* change template name, use base template, prefill calc with answer

* fix test

* Added backlog features.

* Updated js.

* Light refactoring work

* Refactored keycodes.

* Updated C button.

* Rewrote (+/-)% Expressions

* Updated the spacing dertermination

* Added expression to UI by default.

* Update tests.

* Updated formatting.

* Rewrite percent queries.

* Pushing updated codebase.

* Add calculator as trigger word

* Update tests for new triggers

* Stop initializing expression if 0

* add precision support to math eval object.

* Removed scientific buttons / history for Phase 1

* Updated math type.

* Prevents duplicate OPERADNS

* Add duplicate functionality.

* Updated unicode.

* Removed es6 feature.

* Stop first entry being an operand.

* Add operator flipping.

* Added Precision support.

* Handle numpad operator keys

* Set and maintain focus, Improved event handling

* Bind click handler in loop, stopPropgation of keydown

* Cleanup trailing spaces

* Fixed broken assignment.

* Prevent multiple commas.

* Fixed calculator stalling when trying to enter a new operator

* Initial refactor.

* Refactored out expression array.

* Refactored out display var.

* reintroduced matheval object for precision.

* Cleaned up formatting.

* Removed commify.

* Removed positioning for mobile display.

* Don't set focus on Calc automatically when displayed

* Add touchstart support.

* Prevent zooming.

* ensure button text is not selectable

* Add right borders to calc, ensure same border colour

* Cleanup code style

* Only apply hover state css to desktop
2017-04-06 16:40:56 -04:00