Code Monkey home page Code Monkey logo

permission.site's Introduction

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.

permission.site's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

permission.site's Issues

feedback

great site! continue updating it!

Add Generic Sensor API permission requests

I plan to create a pull request that adds the following Generic Sensor API permission requests:

  • AmbientLightSensor
  • Accelerometer
  • LinearAccelerationSensor
  • GravitySensor
  • Gyroscope
  • Magnetometer
  • UncalibratedMagnetometer
  • AbsoluteOrientationSensor
  • RelativeOrientationSensor
  • GeolocationSensor
  • ProximitySensor

Handle non-existent APIs gracefully

This expands on #13.

Right now, we e.g. call navigator.storage.persist() regardless of whether navigator.storage exists (for almost everyone, it doesn't exist right now). We should surface the absence of an API better.

HTTP site does not generate permissions prompts; no errors shown

All platforms, tested on 4/20/20
Chrome 84.0.4115.5 (Official Build) dev (64-bit) (cohort: Dev) and Firefox 74.0.1
Windows 10 Pro Version 1909
not a regression

While the site is toggled to HTTP, the notifications do not launch in Chrome and Firefox. There are no warnings on the site about this so it's easy to accidentally conclude that notifications aren't working if you didn't know that this was expected behavior.

I'd like to see some text on the site letting users know about the expected behavior just to make testing easier.

PWA support

Would the team be interested in a PR that adds enough support for this site to meet Chrome's PWA installability bar? This would entail an app manifest with icons, and a service worker.

Move permission.site registration and hosting

One plan was to do this once GitHub Pages launched HTTPS support, since we need HTTPS to work. Today's announcement reminds me we still need to do it!

@adrifelt, two questions:

  • Is there an Enamel point of contact I should use for the registration migration?
  • Other Google projects (that aren't Google products) use GitHub Pages and/or Let's Encrypt; any concerns with using it for permission.site?

Separate buttons to test Camera and Microphone permissions

(This sort of overlaps with issue #7)
Newer versions of Chrome have separate Camera and Microphone sections in chrome://settings/content. Would you consider adding separate Camera and Microphone permission buttons, in addition to the current combined "Audio + Video" button?

Indicate in the UI when an API is not supported

Instead of just throwing an error in the browser’s console, consider showing in the site’s UI that an error occurred; e.g. when the user clicks on a button which causes an error, you could add

<span style="color: red;"></span>

to the button:

capture


Update: Using a pseudo-element would probably be a better idea.

button.error::after {
    content: " ⚠";
    color: red;
}

Web Bluetooth: Do not filter services

The implementation of the Bluetooth button currently passes filters: [{services: ['battery_service']}] to navigator.bluetooth.requestDevice(). The result is that only devices that support this service are shown in the resulting UI.

Users of the button would be more likely to see devices and be able to proceed further in the resulting UI if there was no filter applied. For example, https://googlechrome.github.io/samples/web-bluetooth/device-info.html?allDevices=true finds other types of devices.

/cc @beaufortfrancois

Motion sensors

Chromium now treats motion sensors as a permission. Would be a good idea to add a check for it.

Request permissions in iframes.

I suggest adding a subdomain, embedded.permission.site which embeds permission.site in an iframe so that the behavior of permissions when requested from content embedded within another origin can be exercised.

Remove ternary within if else to see logic error better

Common guys, don't use ternary operator, replace it within if else to see logic errors more faster, next error is too childish -_-

Example:
https://github.com/chromium/permission.site/blob/master/index.js#L108

    "camera": function() {
      navigator.mediaDevices ?
        navigator.mediaDevices.getUserMedia(
          {video: true}).then(
            displayOutcome("camera", "success"),
            displayOutcome("camera", "error")
        ) :
        navigator.getUserMedia(
          {video: true},
          displayOutcome("camera", "success"),
          displayOutcome("camera", "error")
        );
    },

Uncaught TypeError: navigator.getUserMedia is not a function

And same in lot of other places

Test with an unknown CA or self-signed certificate

Several private web servers have no fully qualified domain name (FQDN) and therefore can have no certificate issued by a certificate authority that major web browsers recognize by default. This includes corporate intranet sites, as well as any appliance on a home network (such as a router, printer, or NAS device) that lacks a valid binding to a dynamic DNS service. Any HTTPS connection to such a server would raise an interstitial certificate warning.

I suggest adding a self-signed version to test whether a user agent's secure context determination differs between a site using a certificate issued by a public CA and a site relying on an exception added by the user.

Link to feature policy demo site?

Similar in spirit, but without permission prompts:

It might make sense to reference, just like badssl.com links to Safe Browsing examples at the bottom.

Add Prettier and ESLint rules

What about adding rules to the repo for Prettier code formatter and ESLint code analyzer?

This should significantly improve the contributor experience.

E.g. I've found that current code uses async / await syntax for Idle Detection API test (1, 2). This is the only place in the code where it is used.

The problem is that permission.site can be used for checking permissions in old browsers that don't support async / await syntax.

Adding disable-async-await ESLint rule could solve this problem.

The HTTP / HTTPS switcher is visually too dynamic

Like if I hover it visually switches to the value NOT selected, if I click on it it visually switches to the value not selected and you have to unhover to see what is actually the selected value.

This is confusing. Please remove the hover effect.

Buttons use only color to indicate permissions status

Written by James Thompson as part of an accessibility audit:
All platforms, tested on 6/25/20

All browsers

Not a regression

Whether or not a button has permission in the browser is indicated with a background color change for the applicable button. No textual equivalent is available in the code.

Light green for
Notifications

Light red for

Location

White for

Camera

Ideally, the color changes would rely on a hue difference between the red and green (for color-blind users), the color will have a high contrast difference from the background (for low-vision users), and either text that is moved of-screen using CSS (See below) or aria-attributes that describes the current state of the button.

Using off-screen text

<style> .off-screen { position: absolute; left:-500px; top:0; width:1; height:1; overflow:hidden; } </style>

NotificationsAllowed

LocationBlocked</span

Camera

Using ARIA attributes

<button aria-pressed=”true” aria-label=”Notifications allowed” id="notifications" class="success">Notifications

<button aria-pressed=”true” aria-label=”Location blocked” id="location" class="error">Location

Camera

Audio and Video are confusing

Especially since they are perfectly valid HTML5 tags. Can we call them Microphone and Camera, respectively? That's at least a lot less confusing to me.

I'd be happy to make a quick PR, if you're okay with that.

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.