GithubHelp home page GithubHelp logo

thieman / github-selfies Goto Github PK

View Code? Open in Web Editor NEW
1.1K 24.0 76.0 176 KB

Everything is better with selfies. Yes, even pull requests. Trust me.

License: MIT License

JavaScript 95.74% CSS 3.63% Shell 0.63%

github-selfies's People

Contributors

bhollis avatar cbayles avatar doredesign avatar haacked avatar inabajunmr avatar msolomon avatar oronnadiv avatar perryh avatar scotchester avatar they4kman avatar thieman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-selfies's Issues

Image comes out mirrored

selfie-0

When I want to show my awesome startup weekend t-shirt, I realized the image was mirrored. Any way to show the preview mirrored but the flip the image before submitting to imgur? I'll look it up if i get a few minutes today.

Use github's image storage?

Now that GitHub allows attaching files to issues directly (githubusercontent.com), it'd be cool if this extension could optionally use that instead of imgur. Thanks!

Handle GitHub's tricky site loading behavior better

This flow almost always works:

  1. Click on Pull Requests in the right bar
  2. Click on New pull request, go from there

This doesn't:

  1. Click on green shortcut button on the repo home page, middle-ish left
  2. Click on a branch, keep going but script never fires

Instead of relying on Chrome to load us on certain paths, we should instead load on every GitHub page load and then fire relevant parts of the extension when we detect that the URL is a match.

Wait until mouse click before starting webcam stream

I find myself accidentally triggering the Github selfie button on mouseover by scrolling down the Github issue page with my mouse in the right spot. It would be great if the plugin would display the buttons but wait until the user clicked on them before requesting access to and displaying the stream of the webcam.

upload to imgur using my account

Most of my selfies are awesomely terrible and I'd like to collect and use them again. Is it possible to (optionally) allow me to create non-anonymous images?

Slack doesn't show selfies in previews because it's a link

From a reviewer in the Chrome store: "Good extension but it needs to just put a plain image and not make the image a link. The link causes the image not to show up in slack and that's just unacceptable :D. Maybe just append a link to the extension after the image?"

Wondering if there's some metadata we can throw somewhere to make Slack happy again.

plugin doesn't seem to load properly in chrome

Recently, the plugin has stopped working.. I see this error in the console:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src assets-cdn.github.com www.google-analytics.com collector-cdn.github.com". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

screenshot

Firefox extension is broken/abandoned

Hi!

Very fun idea!

Unluckily it doesn't seem to be working anymore right now in GitHub for my version of Firefox (I'm on the beta channel).
Am I the only one?

Thanks!

Firefox support

Well, title is self-explanatory :-)

I could also live with a GM script

GitHub enterprise support

It would be great if I could add my GH:E URL to the matches. I don't know anything about Chrome Extensions, but I'm going to dig in and see if I can figure it out.

imgur upload fails

{
"data": {
"error": "Authentication required",
"request": "/3/upload",
"method": "GET"
},
"success": false,
"status": 401
}

Firefox Note

I believe that the Firefox note to disable webcam messages works for all sites. That is, with firefox configured according to the readme any website will be able to use the webcam without permission.

Issue uploading selfie

I received the following error after taking a photo selfie:

Selfie URL: lastcoolnameleft/3d-dc#1
Browser: Google Chrome: Version 51.0.2704.84 (64-bit)
Version: GitHub Selfies 2.0.2 (downloaded from Chrome Store)

FYI, this works for me in Firefox

This is the error that appears in the Chrome Console window. Let me know if you need any other information to reproduce.

Refused to connect to 'https://api.imgur.com/3/upload' because it violates the following Content Security Policy directive: "connect-src 'self' uploads.github.com status.github.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com wss://live.github.com".

1:1 XMLHttpRequest cannot load https://api.imgur.com/3/upload. Failed to start loading.
selfie-base.js:347 Error uploading selfie Objectabort: (e)always: ()complete: ()done: ()error: ()fail: ()getAllResponseHeaders: ()getResponseHeader: (e)overrideMimeType: (e)pipe: ()progress: ()promise: (e)readyState: 0responseText: ""setRequestHeader: (e,t)state: ()status: 0statusCode: (e)statusText: "error"success: ()then: ()proto: ObjectuploadSelfie @ selfie-base.js:347
frameworks-7162bee….js:5 XHR finished loading: GET "https://github.com/lastcoolnameleft/3d-dc/issues/1/show_partial?partial=issues%2Fsidebar%2Flabels_menu_content".send @ frameworks-7162bee….js:5ajax @ frameworks-7162bee….js:4a @ frameworks-7162bee….js:10handle @ frameworks-7162bee….js:4dispatch @ frameworks-7162bee….js:4r.default.event.dispatch @ frameworks-7162bee….js:7r.default.event.dispatch @ frameworks-7162bee….js:7r.default.event.dispatch @ frameworks-7162bee….js:7v.handle @ frameworks-7162bee….js:3

Add a shutter countdown

In order to make the perfect selfies a countdown before taking the picture could be a nice addition.

selfie-0

GitHub selfies conflicts with Bitmoji for Chrome

I'm not sure how to fix this, but if I have both GH selfies and Bitmoji for Chrome enabled and I go to GitHub, I get this:

This extension failed to modify the response header "Content-Security-Policy" of a network request because the modification conflicted with another extension (GitHub Selfies).

I don't want to live in a world where I can't have both selfies AND Bitmoji!

bitmoji

Webcam Firefox hack: Better use about:permissions

Instead of the dangerous Firefox about:config hack, I'd say that it would be much more secure to use about:permissions, look for github.com and adjust the permissions here.
You should never adjust security settings such badly just for a single feature on one website. So with about:permissions that's a much better way to do it.

I did not tested this, but I think it should work.

Bug: Failed to execute 'webkitGetUserMedia' on 'Navigator':

That's what I get on a pull request page. I'm using Chrome Version 35.0.1897.2 dev aura.

Uncaught TypeError: Failed to execute 'webkitGetUserMedia' on 'Navigator': 3 arguments required, but only 2 present. compare.js:16
Uncaught TypeError: Cannot read property 'stop' of null compare.js:26
Uncaught TypeError: Failed to execute 'webkitGetUserMedia' on 'Navigator': 3 arguments required, but only 2 present. compare.js:16
Uncaught TypeError: Cannot read property 'stop' of null compare.js:26
Uncaught TypeError: Failed to execute 'webkitGetUserMedia' on 'Navigator': 3 arguments required, but only 2 present. compare.js:16
Uncaught TypeError: Cannot read property 'stop' of null compare.js:26

Adding Ben Hollis as a collaborator

@bhollis Threw you commit rights because you'd clearly earned it, no pressure or anything, I just didn't want to be in the way of any other improvements you wanted to make.

Thanks again!

Error when using it on Chrome 36.0.1924.0

Saw this error on Chrome Extensions page

Uncaught TypeError: Failed to execute 'webkitGetUserMedia' on 'Naviga

Error in selfie-base.js:202 (anonymous function)

  function startVideo () {
    $('.selfieVideoOverlay').text('Fetching camera stream...');
    $(config.buttonSelector).attr('disabled', 'disabled');
    if (typeof config.preVideoStart === 'function') { config.preVideoStart(); }
    navigator.webkitGetUserMedia({video: true}, function(_stream) {
      var video;
      $(config.buttonSelector).removeAttr('disabled');
      $('.selfieVideoOverlay').text('');
      $(config.videoSelector).removeClass('hideSelfieVideo');
      video  = document.querySelector(config.videoSelector);
      stream = _stream;
      $(config.videoSelector).attr('src', window.URL.createObjectURL(stream));
      if (typeof config.postVideoStart === 'function') { config.postVideoStart(); }
    });
  }

Weird button sizes

image

Browser: Google Chrome 45.0.2454.93 (64-bit)
OS: Linux; kernel 3.19.0-28-generic #30~14.04.1-Ubuntu SMP

Clicking the gif should take you to this repository

Selfie should be wrapped in a a:href to this repo, for social awesomeness. If people want the link to the gif, they can do inspect. As otherwise, selfies always cause questions "how did you do that?" — would be better if that question was self answered.

Feedback from Mozilla reviewer

  1. Remove data/background.js. This file is only relevant for a Chrome extension.

  2. data/selfie.js: When using the message event, always verify that the source is okay, otherwise you may accidentally expose your add-ons functionality to arbitrary pages.
    See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
    For same-page communications, I recommend CustomEvent over postMessage, because the above issue will not occur, and your message event will not conflict with other (badly written) add-ons that do not expect your message events.
    See https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events and
    https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent

  3. Overwriting pushState / replaceState and modifying the CSP is nasty. Try to avoid it if possible. There are several alternatives, e.g. usinga MutationObserver to watch an element for changes. If you really want to overwrite history.pushState, then use exportFunction, see https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/Interacting_with_page_scripts#Expose_functions_to_page_scripts and https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction

Save History of Selfies

Thanks for this awesome plugin. It's made our office lives even more hilarious.

Purely selfish request, but would love to be able to save a history or set of favorites.

Bad security advice in Firefox Add-On store

On the Github Selfie page [1] of the Firefox Add-On store, the description says:

IMPORTANT NOTE

Firefox will constantly ask you to use your webcam by default.
To let it always use your webcam, do the following:

1. Type "about:config" in your address bar and hit Enter.
2. Search for "media.navigator.permission.disabled"
3. Set it to True.

There is no need to say that letting a web browser always use a webcam without asking for user's permission is just a security hazard that should never be advised unless for development purposes. If possible, please remove that note.

[1] https://addons.mozilla.org/en-US/firefox/addon/github-selfies/

Claudio

Moar sparkles

Is there a way we can swegify selfies with dynamic overlay injectionz? Basically thinking like dis

selfie-0

Do not start webcam upon mouse hover

Anytime I hover the extension's buttons (which apparently I mistakenly do 20 times a day because my mouse pointer happens to pass over it) it starts webcam immediately. Sort of like UX bug to me since it's annoying and I rarely take selfies. :)

Not sure if it's happening to just me.

image

Safari Extension

It would be cool to have a version of this extension also available for Safari!

A github selfie appeared and wiped out my inline comment!

I was going about my business and commenting on a PR inline in the diff when I saw the selfie button. I hadnt used the extension in a while and had just been talking with my coworker about how we need to bring selfies back into the process, so I decided to do one. When I completed my priceless selfie gif, it wiped out the content of my comment! While often the selfie can express everything and more that I need to say, in this case it would have been nice to have words as well. Just wanted to let you know. k thx bai.

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.