Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active January 31, 2018 07:59
Show Gist options
  • Save kjunichi/758039c4b5e804c44788 to your computer and use it in GitHub Desktop.
Save kjunichi/758039c4b5e804c44788 to your computer and use it in GitHub Desktop.
Google Chromeのメモ

chrome.exeのありか

windows

%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe

%ProgramFiles%\

Chrome Canary

%LOCALAPPDATA%\Google\Chrome

OSX

/Applications/Google Chrome.app

Chrome Canary

/Applications/Google Canary Chrome.app

Linux

Ubuntu

/usr/bin/google-chrome

機能拡張

インストールした機能拡張を使うには

機能拡張のIDを指定して

chrome.runtime.sendMessage

メッセージングして使う模様

呼び出し側

chrome.runtime.sendMessage(
        config.chromeExtensionId,
        { getVersion: true },
        function (response) {
            if (!response || !response.version) {
                // Communication failure - assume that no endpoint exists
                console.warn("Extension not installed?: " + chrome.runtime.lastError);
                isInstalledCallback(false);
            } else {
                // Check installed extension version
                var extVersion = response.version;
                console.log('Extension version is: ' + extVersion);
                var updateRequired = isUpdateRequired(config.minChromeExtVersion, extVersion);
                if (updateRequired) {
                    alert(
                        'Jitsi Desktop Streamer requires update. ' +
                        'Changes will take effect after next Chrome restart.');
                }
                isInstalledCallback(!updateRequired);
            }
        }
    );

受け側

コマンドライン

大きさを指定して起動

--window-size=320,240

シンプルなウィンドウで起動

chrome.exe --app=https://localhost:4430/webrtc.html

オレオレ証明書対応

--ignore-certificate-errors

Link

関連記事

関連

アクセス解析タグ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment