Skip to content

Instantly share code, notes, and snippets.

...
if (EMSCRIPTEN)
...
set(OPENSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/crypto/openssl)
set(OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include")
set(OPENSSL_CRYPTO_LIBRARY "${OPENSSL_ROOT_DIR}/lib/libcrypto.a")
set(OPENSSL_SSL_LIBRARY "${OPENSSL_ROOT_DIR}/lib/libssl.a")
set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
...
eg:
download openssl-1.0.2a
emmake bash
./Configure no-asm no-apps no-ssl2 no-ssl3 no-comp no-hw no-engine no-deprecated no-dso --openssldir=built linux-generic64
make -j 4
download openssl-1.0.2p
emmake bash
./Configure no-asm no-apps no-ssl2 no-ssl3 no-comp no-hw no-engine no-deprecated no-dso --openssldir=built linux-generic64
make -j 4
// icon 16x16
inject.js
...
window.onload = function() {
...
var request = {
'action_name': 'share_found',
'url': '<url>' // link search
}
manifest.json
...
"options_ui": {
"page": "options.html",
"open_in_tab": false
},
...
background.js
...
manifest.json
...
"content_scripts": [
{
"matches": ["*://*/*"],
"js": [
"inject.js"
]
}
],
...
@Override
protected void onResume() {
...
// Resources.getSystem().getConfiguration().locale.toString() (Language. Flag in local storage)
...
Intent intent = new Intent(getBaseContext(), MapsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
getBaseContext().startActivity(intent);
Runtime.getRuntime().exit(0);