Skip to content

Commit

Permalink
Adds support for Gist
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorocha committed Apr 17, 2017
1 parent 4d6f8a7 commit 7e9ac4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"https://medium.com/*",
"https://www.npmjs.com/*",
"https://github.com/*",
"https://gist.github.com/*",
"http://stackexchange.com/*",
"https://stackexchange.com/*",
"http://*.stackexchange.com/*",
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ var snippets = document.querySelectorAll('pre');
wrapper.classList.add('codecopy');
wrapper.firstChild.insertAdjacentHTML('beforebegin', '<button class="codecopy-btn tooltipped tooltipped-s" aria-label="Copy to clipboard"><svg height="16" class="codecopy-btn-icon" viewBox="0 0 14 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"></path></svg></button>');

var sites = /^(github.com|medium.com|www.npmjs.com|developer.mozilla.org)$/;
var sites = /^(github.com|gist.github.com|medium.com|www.npmjs.com|developer.mozilla.org)$/;

if (sites.exec(document.location.hostname)) {
wrapper.classList.add('codecopy-lg');
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let snippets = document.querySelectorAll('pre');
wrapper.classList.add('codecopy');
wrapper.firstChild.insertAdjacentHTML('beforebegin', '<button class="codecopy-btn tooltipped tooltipped-s" aria-label="Copy to clipboard"><svg height="16" class="codecopy-btn-icon" viewBox="0 0 14 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"></path></svg></button>');

let sites = /^(github.com|medium.com|www.npmjs.com|developer.mozilla.org)$/;
let sites = /^(github.com|gist.github.com|medium.com|www.npmjs.com|developer.mozilla.org)$/;

if (sites.exec(document.location.hostname)) {
wrapper.classList.add('codecopy-lg');
Expand Down

0 comments on commit 7e9ac4f

Please sign in to comment.