richjddavis / safari-fullscreen-noescape

A small Safari extension to disable the default behaviour of Safari exiting OS X Full Screen Mode when the Escape key is pressed.
MIT License
14 stars 3 forks source link

Safari 12 #2

Open romanmorozov81 opened 6 years ago

romanmorozov81 commented 6 years ago

New version 12 of Safari now supports only extensions from Safari Gallery. Any chance to push this very helpful extension to Safari Gallery? Or is it possible to it in Tampermonkey?

richjddavis commented 6 years ago

Yeah, I’ll look at doing this over the weekend. Thanks for being patient!

richjddavis commented 6 years ago

I've submitted the extension as-is to the Safari Extension Gallery, we'll just have to wait and see if they'll accept it. I've heard anecdotal suggestions that they reject extensions that provide "insufficient" functionality.

romanmorozov81 commented 6 years ago

Thank you anyway!

Best regards Rooman V. Morozov 22 сент. 2018 г., 10:32 +0300, Rich Davis notifications@github.com, писал:

I've submitted the extension as-is to the Safari Extension Gallery, we'll just have to wait and see if they'll accept it. I've heard anecdotal suggestions that they reject extensions that provide "insufficient" functionality. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Bouke commented 6 years ago

Beware that the gallery is also deprecated per 2019, and new submissions must go through the App Store. Anyway thanks a lot for your effort and prior use of this plugin!

romanmorozov81 commented 6 years ago

Hi, did Apple accepted it?

— С уважением, Роман Морозов +7(903)106-3004 22 сент. 2018 г., 10:33 +0300, Роман Морозов romanmorozov@mail.ru, писал:

Thank you anyway!

Best regards Rooman V. Morozov 22 сент. 2018 г., 10:32 +0300, Rich Davis notifications@github.com, писал:

I've submitted the extension as-is to the Safari Extension Gallery, we'll just have to wait and see if they'll accept it. I've heard anecdotal suggestions that they reject extensions that provide "insufficient" functionality. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

richjddavis commented 6 years ago

@Bouke thanks, I was reminded of that when I was checking the documentation. My plan is to get this into the Extension Gallery now, and move it to the App Store before the end of the year.

@romanmorozov81 I've submitted it twice and have been knocked back twice, both essentially due to my own incompetence: once for missing an icon, and the second time because it apparently doesn't work. I suspect the reviewer tested it on the New Tab page, which is listed as something that is known to not work in the repo's readme, but I mustn't have included it in the blurb on the submission.

ictmediacz commented 6 years ago

@richjddavis Hello Rich, can we expect further attempts to get it into the Gallery, or is this over, please? Thank you

richjddavis commented 6 years ago

It's not over yet, though my personal machine's decided it no longer wants to boot into macOS. I definitely haven't given up, just managing priorities is a bit tricky at this time of the year. Sorry that it's taking so long.

romanmorozov81 commented 6 years ago

I've managed to run your script in Tampermonkey. Just download it from Safari Gallery and import this file to Tampermonkey. tampermonkey_scripts.txt

romanmorozov81 commented 6 years ago

It works in all tabs except blank tab. Any ideas how to run it in blank tab?

romanmorozov81 commented 6 years ago

Code inside Tampermonkey script

// ==UserScript==
// @name         Full Screen NoEscape
// @namespace    https://github.com/richjddavis/safari-fullscreen-noescape
// @version      1.0.0
// @description  A small Safari extension to disable the default behaviour of Safari exiting OS X Full Screen Mode when the Escape key is pressed.
// @author       Rich Davis
// @include      *
// @grant        none
// ==/UserScript==

(function(window) {
    'use strict';
    const KEYCODE_ESCAPE = 27;

    window.addEventListener('keypress', function suppressEscape(event) {
    if (event.keyCode === KEYCODE_ESCAPE) {
        event.preventDefault();
    }
});
})(window);

Just in case someone need it, or want to make corrections. Sorry I'm not a coder.

EDIT (@richjddavis): I just cleaned it up a little

richjddavis commented 6 years ago

@romanmorozov81 I can't really endorse Tampermonkey, but your snippet should do the job.

I suspect it doesn't work on a blank/new tab for the same reason this extension also never worked in those contexts: Safari doesn't load extensions (at least not legacy extensions, not sure about app extensions) on those "pages".

Zwimber commented 3 years ago

I was so excited when I found this plugin because I hate this Safari functionality. Did you find a way to get it to run on the latest Safari?