Skip to content
This repository was archived by the owner on Aug 2, 2018. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Juicy/juicy-redirect
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Palindrom/palindrom-redirect
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Oct 1, 2014

  1. Rename to puppet-redirect

    tomalec committed Oct 1, 2014
    Copy the full SHA
    9be3597 View commit details
  2. Merge remote-tracking branch 'juicy/gh-pages' into gh-pages

    Conflicts:
    	README.md
    	index.html
    	src/puppet-redirect.html
    tomalec committed Oct 1, 2014
    Copy the full SHA
    0823c84 View commit details

Commits on Dec 15, 2014

  1. merge back changes from juicy-redirect 0.1.3: remove Polymer keyword …

    …(Polymer is not used); remove platform.js from dependencies (polyfill is not required in some browsers: Chrome, Opera); update path in readme.md)
    warpech committed Dec 15, 2014
    Copy the full SHA
    4dafc7c View commit details
  2. 0.1.3

    warpech committed Dec 15, 2014
    Copy the full SHA
    2ebb800 View commit details

Commits on Dec 7, 2015

  1. Merge Juicy/juicy-redirect@2.0.0 into gh-pages

    # Conflicts:
    #	bower.json
    #	src/puppet-redirect.html
    tomalec committed Dec 7, 2015
    Copy the full SHA
    bbd3f21 View commit details

Commits on Dec 15, 2015

  1. Merge remote-tracking branch 'juicy/gh-pages' into gh-pages

    # Conflicts:
    #	bower.json
    #	src/puppet-redirect.html
    tomalec committed Dec 15, 2015
    Copy the full SHA
    3ea4ab9 View commit details
  2. Merge remote-tracking branch 'juicy/gh-pages' into gh-pages

    # Conflicts:
    #	README.md
    #	bower.json
    #	index.html
    #	juicy-redirect.html
    #	src/juicy-redirect.html
    #	src/puppet-redirect.html
    tomalec committed Dec 15, 2015
    Copy the full SHA
    921c8fc View commit details

Commits on Mar 31, 2016

  1. Merge branch 'juicy/gh-pages' into gh-pages

    Conflicts:
    	bower.json
    warpech committed Mar 31, 2016
    Copy the full SHA
    069e433 View commit details
  2. rename file

    warpech committed Mar 31, 2016
    Copy the full SHA
    8637701 View commit details
  3. 0.4.2

    warpech committed Mar 31, 2016
    Copy the full SHA
    7b0b7dc View commit details

Commits on May 24, 2016

  1. Merge branch 'gh-pages' of github.com:Juicy/juicy-redirect into juicy

    # Conflicts:
    #	bower.json
    #	package.json
    #	puppet-redirect.html
    warpech committed May 24, 2016
    Copy the full SHA
    701d407 View commit details
  2. 0.4.3

    warpech committed May 24, 2016
    Copy the full SHA
    c15a749 View commit details

Commits on Jan 10, 2017

  1. Copy the full SHA
    16470a4 View commit details

Commits on Feb 23, 2017

  1. Fix a typo

    Konstantin authored Feb 23, 2017
    Copy the full SHA
    d68896c View commit details

Commits on Feb 28, 2017

  1. Copy the full SHA
    f0fdae3 View commit details

Commits on Mar 1, 2017

  1. 0.4.4

    alshakero committed Mar 1, 2017
    Copy the full SHA
    db041a0 View commit details
  2. 0.4.4

    alshakero committed Mar 1, 2017
    Copy the full SHA
    b004d69 View commit details
  3. 0.5.0

    alshakero committed Mar 1, 2017
    Copy the full SHA
    0de40a8 View commit details
  4. Merge pull request #5 from Palindrom/rename-to-palindrom-redirect

    Rename to palindrom-redirect with backward comp
    alshakero authored Mar 1, 2017
    Copy the full SHA
    cfc6b10 View commit details

Commits on Oct 16, 2017

  1. Merge branch 'master' of https://github.com/Juicy/juicy-redirect into…

    … juicy_redirect_merge
    
    # Conflicts:
    #	README.md
    #	bower.json
    #	juicy-redirect.html
    #	package.json
    PatrykSzwer committed Oct 16, 2017
    Copy the full SHA
    b7cb3f5 View commit details

Commits on Oct 17, 2017

  1. Copy the full SHA
    2102197 View commit details
  2. Merge pull request #7 from Palindrom/juicy_redirect_merge

    Juicy redirect merge
    PatrykSzwer authored Oct 17, 2017
    Copy the full SHA
    b955cde View commit details
  3. 0.6.0

    PatrykSzwer committed Oct 17, 2017
    Copy the full SHA
    89cc748 View commit details
  4. Copy the full SHA
    79d7bdc View commit details

Commits on Oct 19, 2017

  1. palindrom-redirect 0.6.0

    PatrykSzwer committed Oct 19, 2017
    Copy the full SHA
    e846d04 View commit details

Commits on Nov 10, 2017

  1. Merge 8#: Improve backward compatibility

    Mihai authored and alshakero committed Nov 10, 2017
    Copy the full SHA
    77e788c View commit details

Commits on Nov 14, 2017

  1. 0.7.0

    alshakero committed Nov 14, 2017
    Copy the full SHA
    97d342c View commit details

Commits on Jan 4, 2018

  1. Upgrade to **autonomous** CEv1,

    Remove `puppet-redirect` backward compatibility layer.
    
    Problem: it was not working with latest WebComponents.js polyfill
    tomalec committed Jan 4, 2018
    Copy the full SHA
    202187d View commit details
  2. Copy the full SHA
    144de0c View commit details
  3. Merge pull request #9 from Palindrom/CEv1

    Upgrade to **autonomous** CEv1,
    tomalec authored Jan 4, 2018
    Copy the full SHA
    df5dc7d View commit details
  4. 1.0.0

    tomalec committed Jan 4, 2018
    Copy the full SHA
    8eba6ce View commit details

Commits on Aug 13, 2018

  1. Clean the code up

    alshakero committed Aug 13, 2018
    Copy the full SHA
    bc50dc1 View commit details
  2. Copy the full SHA
    ed709b3 View commit details
  3. Copy the full SHA
    eb66894 View commit details
  4. Fix wct.conf.json

    alshakero committed Aug 13, 2018
    Copy the full SHA
    5ad78fc View commit details
  5. Bower install wct

    alshakero committed Aug 13, 2018
    Copy the full SHA
    b338747 View commit details
  6. Test redirect mode too

    alshakero committed Aug 13, 2018
    Copy the full SHA
    1569283 View commit details

Commits on Aug 14, 2018

  1. Copy the full SHA
    4c9b8bb View commit details
  2. Copy the full SHA
    fde5869 View commit details
  3. Add wct.config.json

    alshakero committed Aug 14, 2018
    Copy the full SHA
    50bb813 View commit details

Commits on Aug 21, 2018

  1. Merge pull request #11 from Palindrom/Cleanup-code

    Low prio: cleanup code and add tests
    alshakero authored Aug 21, 2018
    Copy the full SHA
    1228fdd View commit details

Commits on Aug 29, 2018

  1. Copy the full SHA
    cbcba1a View commit details
  2. Add a test for shadow mode

    alshakero committed Aug 29, 2018
    Copy the full SHA
    13b4d3d View commit details
  3. Add version banner

    alshakero committed Aug 29, 2018
    Copy the full SHA
    b49f761 View commit details
  4. 1.0.1

    alshakero committed Aug 29, 2018
    Copy the full SHA
    97579b9 View commit details
  5. Merge pull request #12 from Palindrom/alshakero-patch-1

    Make it work in Shadow DOM
    alshakero authored Aug 29, 2018
    Copy the full SHA
    26c0ab9 View commit details

Commits on Sep 20, 2018

  1. Copy the full SHA
    7a7ec18 View commit details
  2. Merge pull request #13 from Palindrom/bower-ignore-test

    Add test and wct.conf to bower ignores
    tomalec authored Sep 20, 2018
    Copy the full SHA
    ec87215 View commit details

Commits on Nov 20, 2018

  1. add devDependencies

    that are required to run the test suite locally
    warpech committed Nov 20, 2018
    Copy the full SHA
    2176dcc View commit details
  2. fix for fast redirection that was not working

    by fast redirection, I mean a case in which Palindrom rapidly performs redirection twice. The second redirection URL is propagated to <palindrom-redirect> while the element is not yet connected to DOM. This resulted in the event not bubbling properly, therefore not being catched by "window.addEventListener" in PalindromDOM
    
    Tested in Chrome, Firefox, Safari
    
    This is a partial fix for https://github.com/Starcounter/HeadsOmni/issues/293
    warpech committed Nov 20, 2018
    Copy the full SHA
    bfea613 View commit details
Showing with 1,229 additions and 126 deletions.
  1. +1 −0 .gitignore
  2. +20 −0 .travis.yml
  3. +5 −5 CONTRIBUTING.md
  4. +2 −2 Gruntfile.js
  5. +9 −9 README.md
  6. +12 −6 bower.json
  7. +16 −16 index.html
  8. +0 −70 juicy-redirect.html
  9. +827 −0 package-lock.json
  10. +14 −12 package.json
  11. +63 −0 palindrom-redirect.html
  12. +4 −0 puppet-redirect.html
  13. +0 −6 src/juicy-redirect.html
  14. +21 −0 test/index.html
  15. +121 −0 test/spec-history.html
  16. +48 −0 test/spec-redirect.html
  17. +46 −0 test/spec-shadow.html
  18. +20 −0 wct.conf.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bower_components/
node_modules/
.idea
*.log
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js
sudo: required
dist: trusty
before_script:
- npm install -g web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
- bower install web-component-tester
node_js: 8
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run npm run wct:no-sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then npm run wct:sauce-only; fi"
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -8,23 +8,23 @@ Our team heavily uses Github for all of our software management. We use Github i

If you find an issue, please do file it on the repository.

We love examples for addressing issues - issues with a Plunkr, [jsFiddle](http://jsfiddle.net), or [jsBin](http://jsbin.com) will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/capequ/edit?html,output) which sets up the basics to demonstrate a Juicy element.
We love examples for addressing issues - issues with a Plunkr, [jsFiddle](http://jsfiddle.net), or [jsBin](http://jsbin.com) will be much easier for us to work on quickly. You can start with [this jsbin](http://jsbin.com/capequ/edit?html,output) which sets up the basics to demonstrate a Palindrom element.

Occasionally we'll close issues if they appear stale or are too vague - please don't take this personally! Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed.

## Developing the element

If you would like to start to fiddle with element's code, here is the flow we use.

- Make a local clone of this repo: `git clone git@github.com:Juicy/juicy-redirect.git`
- Make a local clone of this repo: `git clone git@github.com:Palindrom/palindrom-redirect.git`

In order to develop it locally we suggest to use [polyserve](https://npmjs.com/polyserve) tool to handle bower paths gently.

0. Go to the repo's directory: `cd juicy-redirect`
0. Go to the repo's directory: `cd palindrom-redirect`
1. Install [bower](http://bower.io/) & [polyserve](https://npmjs.com/polyserve): `$ npm install -g bower polyserve`
2. Install local dependencies: `$ bower install`
3. Start development server `$ polyserve -p 8000`
4. Open the demo/preview: [http://localhost:8000/components/juicy-redirect/](http://localhost:8000/components/juicy-redirect/)
4. Open the demo/preview: [http://localhost:8000/components/palindrom-redirect/](http://localhost:8000/components/palindrom-redirect/)

## Contributing Pull Requests

@@ -33,4 +33,4 @@ In order to develop it locally we suggest to use [polyserve](https://npmjs.com/p
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Open corresponding issue if needed
6. Submit a pull request :D
6. Submit a pull request :D
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -24,10 +24,10 @@ module.exports = function(grunt) {
},
bump: {
options: {
files: ['package.json', 'bower.json', 'juicy-redirect.html'],
files: ['package.json', 'bower.json', 'palindrom-redirect.html'],
commit: true,
commitMessage: '%VERSION%',
commitFiles: ['package.json', 'bower.json', 'juicy-redirect.html'],
commitFiles: ['package.json', 'bower.json', 'palindrom-redirect.html'],
createTag: true,
tagName: '%VERSION%',
tagMessage: 'Version %VERSION%',
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# &lt;link is="juicy-redirect"&gt;
# &lt;palindrom-redirect&gt;

> Custom Element that redirects to a new URL when an attribute is changed. It can be configured to work using window location or History API.
## Demo

[Check it live!](http://juicy.github.io/juicy-redirect)
[Check it live!](http://Palindrom.github.io/palindrom-redirect)

## Install

Install the component using [Bower](http://bower.io/):

```sh
$ bower install juicy-redirect --save
$ bower install palindrom-redirect --save
```

Or [download as ZIP](https://github.com/juicy/juicy-redirect/archive/master.zip).
Or [download as ZIP](https://github.com/Palindrom/palindrom-redirect/archive/master.zip).

## Usage

@@ -27,13 +27,13 @@ Or [download as ZIP](https://github.com/juicy/juicy-redirect/archive/master.zip)
2. Import Custom Element:

```html
<link rel="import" href="bower_components/juicy-redirect/juicy-redirect.html">
<link rel="import" href="bower_components/palindrom-redirect/palindrom-redirect.html">
```

3. Start using it!

```html
<link is="juicy-redirect" url=""></link>
<palindrom-redirect url=""></palindrom-redirect>
```

## Attributes
@@ -43,13 +43,13 @@ Attribute | Options | Default | Description
`url` | *String* | | Destination URL
`url` | `current` | | If a string `"current"` is provided as the URL, the component reloads the page
`history` | | | If attribute `history` is present, the History API `pushState` is used instead of `window.location`
`target` | *String* | `_self` | Target where to open the link. Use `"_blank"` to open in new tab
`target` | *String* | `_self` | Target where to open the link. Use `"_blank"` to open in new tab.

## Events

Name | Details | Bubbles | Description
--- | --- | --- | ---
`juicy-redirect-pushstate` | `{url: "/new/path"}` | yes | Triggers every tie `history.state` is changed by the element
`palindrom-redirect-pushstate`| `{url: "/new/path"}` | yes | Triggers every tie `history.state` is changed by the element. This event is being listened by Palindrom, and triggers updating its state.

## Methods

@@ -61,7 +61,7 @@ Name | Parameters | Returns | Description

## History

For detailed changelog, check [Releases](https://github.com/juicy/redirect/releases).
For detailed changelog, check [Releases](https://github.com/Palindrom/redirect/releases).

## License

18 changes: 12 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "juicy-redirect",
"version": "0.6.0",
"description": "Custom Element that redirects to a new URL when an attribute is changed",
"name": "palindrom-redirect",
"version": "1.0.2",
"description": "Custom Element that redirects to a new URL when an attribute is changed. It's also being listened by Palindrom.",
"license": "MIT",
"main": "juicy-redirect.html",
"main": "palindrom-redirect.html",
"keywords": [
"web-components"
],
@@ -12,12 +12,18 @@
"node_modules",
"bower_components",
"preview.png",
"Gruntfile.js"
"Gruntfile.js",
"test",
"wct.conf.json"
],
"dependencies": {
},
"devDependencies": {
"web-component-tester": "^6.0.0",
"webcomponentsjs": "1.*.*"
},
"authors": [
"Marcin Warpechowski <marcin@nextgen.pl>",
"Tomek Wytrebowicz"
"Tomek Wytrebowicz <tomalecpub@gmail.com>"
]
}
32 changes: 16 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@
<html>
<head>
<meta charset="UTF-8">
<title>&lt;link is="juicy-redirect"&gt;</title>
<link rel="stylesheet" href="http://juicy.github.io/juicy-tile-list/examples/github-markdown.css">
<title>&lt;palindrom-redirect&gt;</title>
<link rel="stylesheet" href="http://juicy.github.io/github-markdown-css/github-markdown.css">

<!-- Importing Web Component's Polyfill (optional, allows to run it in old browsers) -->
<script src="https://cdn.jsdelivr.net/webcomponentsjs/0.7.19/webcomponents.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@1.0.22/webcomponents-lite.js"></script>

<!-- Importing Custom Elements -->
<link rel="import" href="juicy-redirect.html">
<link rel="import" href="palindrom-redirect.html">

<style>
html {
@@ -23,22 +23,22 @@
</head>

<body class="markdown-body">
<a href="https://github.com/Juicy/juicy-redirect"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<a href="https://github.com/PuppetJs/puppet-redirect"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>

<h1>&lt;link is="juicy-redirect"&gt;
<iframe src="http://ghbtns.com/github-btn.html?user=juicy&repo=juicy-redirect&type=watch&count=true&size=medium"
<h1>&lt;palindrom-redirect&gt;<s>&lt;link is="puppet-redirect"&gt;</s>
<iframe src="http://ghbtns.com/github-btn.html?user=puppetjs&repo=puppet-redirect&type=watch&count=true&size=medium"
allowtransparency="true" frameborder="0" scrolling="0" width="90" height="30"></iframe></h1>

<p>Custom Element that redirects to a new URL when an attribute is changed.</p>

<p>It can be configured to work using window location or History API.</p>

<p>See <a href="https://github.com/Juicy/juicy-redirect">README.md</a> for docs</p>
<p>See <a href="https://github.com/PuppetJs/puppet-redirect">README.md</a> for docs</p>

<h2>Redirect using <code>window.location</code></h2>
<button id="example1">&lt;link is="juicy-redirect" url="/"&gt;</button>
<button id="example1">&lt;palindrom-redirect url="/"&gt;&lt;/palindrom-redirect&gt;</button>

<link is="juicy-redirect" id="redirect1">
<palindrom-redirect id="redirect1"></palindrom-redirect>

<script>
document.getElementById("example1").addEventListener("click", function () {
@@ -47,9 +47,9 @@ <h2>Redirect using <code>window.location</code></h2>
</script>

<h3>Open new tab</h3>
<button id="example1_blank">&lt;link is="juicy-redirect" url="/" target="_blank"&gt;</button>
<button id="example1_blank">&lt;palindrom-redirect url="/" target="_blank"&gt;&lt;/palindrom-redirect&gt;</button>

<link is="juicy-redirect" id="redirect1_blank" target="_blank">
<palindrom-redirect id="redirect1_blank" target="_blank"></palindrom-redirect>

<script>
document.getElementById("example1_blank").addEventListener("click", function () {
@@ -60,18 +60,18 @@ <h3>Open new tab</h3>
<h2>Redirect using History API (<code>history.pushState</code>)</h2>
<p>Watch console entries for events logging</p>

<button id="example2">&lt;link is="juicy-redirect" history url="/"&gt;</button>
<button id="example2">&lt;palindrom-redirect history url="/"&gt;&lt;/palindrom-redirect&gt;</button>

<link is="juicy-redirect" history id="redirect2">
<palindrom-redirect history id="redirect2"></palindrom-redirect>

<script>
document.getElementById("example2").addEventListener("click", function () {
document.getElementById("redirect2").setAttribute("url", "/");
});
</script>
<script>
window.addEventListener("juicy-redirect-pushstate", function (e) {
console.info("`juicy-redirect-pushstate` triggered with", e.detail, location.href)
window.addEventListener("puppet-redirect-pushstate", function (e) {
console.info("`puppet-redirect-pushstate` triggered with", e.detail, location.href)
});
</script>

70 changes: 0 additions & 70 deletions juicy-redirect.html

This file was deleted.

Loading