OneSignal AMP extension for web push notifications on AMP pages.
JavaScript HTML Python CSS Java Protocol Buffer Other
Pull request Compare This branch is 4 commits ahead, 35 commits behind ampproject:master.
Latest commit db2f892 Apr 13, 2017 @jasonpang jasonpang committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
.github Add accessibility suggestion to PR template (#7976) Mar 10, 2017
3p Amp-Gist: Have links open in new tab (#8587) (#8603) Apr 6, 2017
ads Add launch flags to invert A4A experiment flags (#8674) Apr 13, 2017
build-system Activate pump-early-frame experiment for canary. (#8705) Apr 12, 2017
builtins Move all service handles into one file. (#8539) Mar 31, 2017
contributing Contributing document describing the basics of how to contribute vali… Apr 6, 2017
css Experiment with new ad default placeholder design (#8629) Apr 10, 2017
examples Add support for "waitFor" in visibility-v3 (#8650) Apr 11, 2017
extensions Adds centering logic for AdSense/DoubleClick FF. (#8724) Apr 13, 2017
screenshots/test/manual Updated screenshots Jan 27, 2016
spec Clarify the adding of target= to anchors. (#8734) Apr 12, 2017
src Prevent 'forEach is not defined' in installActionHandler (#8702) (#8712) Apr 13, 2017
test Prevent 'forEach is not defined' in installActionHandler (#8702) (#8712) Apr 13, 2017
testing AMP Access to ampdoc-level service (#8600) Apr 7, 2017
third_party Analytics: visibility triggers for docs and embeds (#7655) Mar 13, 2017
tools Only allow setting cookies on AMP cache domains when explicitly allow… Apr 11, 2017
validator Fix validation for duplicate attribute names on dispatch keys (#8748) Apr 13, 2017
viewer-api swipe api (#8357) Mar 24, 2017
.babelrc add destructuring to babel transform whitelist (#4206) Jul 26, 2016
.eslintrc Forbid assignments inside a conditional (#7486) Feb 10, 2017
.gitignore initial commit (#8404) Mar 27, 2017
.travis.yml Remove external font reference from test. (#8631) Apr 7, 2017
CODE_OF_CONDUCT.md Establish a code of conduct for the AMP open source project. Oct 15, 2015
CONTRIBUTING.md Adds links to "join project" form & better places to ask questions (#… Apr 10, 2017
GOVERNANCE.md Update project governance. (#7668) Mar 13, 2017
LICENSE fix(license): fix incorrect search and replace done on LICENSE file Sep 10, 2015
OWNERS.yaml Add jridgewell to global owners (#8139) Mar 15, 2017
Procfile Allow binding to specific hostname or IP, default to localhost (#4422) Aug 9, 2016
README.md Update README.md Apr 13, 2017
gulpfile.js Amp-gist: Implement GitHub Gist embed. (#8263) Mar 29, 2017
package.json Unblocking the master on Edge (#8680) Apr 10, 2017
system.properties add custom closure compiler pass (#2593) Apr 22, 2016
yarn.lock Revert "temporarily turn off yarn (#8356)" (#8384) Mar 27, 2017

README.md

OneSignal AMP Extension ⚡

First-time Setup

  • Read amphtml's Developer Guide. Mostly just yarn dependencies after cloning.

  • Use a column length of 80 characters, following their Google JavaScript Style Guide.

  • A .editorconfig you can use (but don't check in with the final PR) is:

    root = true
    
    [*]
    indent_style = space
    indent_size = 2
    end_of_line = lf
    charset = utf-8
    trim_trailing_whitespace = true
    insert_final_newline = true
    

Developing

Run gulp and then visit http://localhost:8000/examples/amp-onesignal.amp.max.html

Testing

To test, run gulp test --files=extensions/amp-onesignal/0.1/test/test-amp-onesignal.js --watch (can take a while)

If you see:

No captured browser, open http://localhost:xxxx/

Then the Karma test runner was not able to automatically find and open Chrome. Tests then get a little weird. Open the browser to that URL, and click Debug to run the tests. Leave the tab open (pin it in Chrome so you won't close it), and when you change the code, the tests will start to run on the console.

Developer Guides