thieman / github-selfies Goto Github PK
View Code? Open in Web Editor NEWEverything is better with selfies. Yes, even pull requests. Trust me.
License: MIT License
Everything is better with selfies. Yes, even pull requests. Trust me.
License: MIT License
Was just trying to take a selfie but it wasn't working. Sad panda. 🐼 😦
Is possible to see a preview before the auto uploading of the image?
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!
This flow almost always works:
This doesn't:
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.
GitHub maybe changed things.
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.
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?
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.
Bug introduced in 1.4
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.
This is awesome 😆 !!!
Can you integrate Gif support, so one could attach a selfie-gif? Like the ones you can make at http://gif.gg or http://meatspac.es?!
That would be even awesomer, yes?
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!
Well, title is self-explanatory :-)
I could also live with a GM script
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.
{
"data": {
"error": "Authentication required",
"request": "/3/upload",
"method": "GET"
},
"success": false,
"status": 401
}
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.
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
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!
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.
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
@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!
I'd love to use this on safari
Every time I go to a PR or issue page, access to my camera is automatically requested which is not ideal. I'd rather see a button that says "Activate Selfies" that then fills in the UI as needed.
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(); }
});
}
Browser: Google Chrome 45.0.2454.93 (64-bit)
OS: Linux; kernel 3.19.0-28-generic #30~14.04.1-Ubuntu SMP
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.
Remove data/background.js. This file is only relevant for a Chrome extension.
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
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
When there's a Pro-Tip, it gets a little crowded down there.
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.
Like here pandas-dev/pandas#5842
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
Bug introduced by 1.4
Is there a way we can swegify selfies with dynamic overlay injectionz? Basically thinking like dis
It should be like in #59 where it waits.
It does not seem to work on pull requests anymore?
It would be cool to have a version of this extension also available for Safari!
I mean, why not?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.