cURL – Latest Chromium Downloader

echo off
::stuff you can modify.
::--------------------------------------------------------------------------------
::                          http|https
set PROTOCOL=http
::                          snapshots|continuous
set BRANCH=snapshots
::                          Android|Arm|Linux|LinuxGit|LinuxGit_x64|Linux_ARM_Cross-Compile|Linux_ChromiumOS|Linux_ChromiumOS_Full|Linux_x64|Mac|MacGit|Win|WinGit|Win_x64|chromium-full-linux-chromeos
set OS=Win_x64
::                          mini_installer.exe|REVISIONS|chrome-win32-syms.zip|chrome-win32.zip|pnacl.zip|content-shell.zip|gcapi.zip|metrics-metadata.zip|remoting-host.msi|remoting-me2me-host-win.zip|devtools_frontend.zip|chrome-linux.zip|changelog.xml|chrome-android.zip
set FILE=mini_installer.exe
::--------------------------------------------------------------------------------


::stuff you should keep as is.
::--------------------------------------------------------------------------------
set URL_LASTCHANGE=%PROTOCOL%://storage.googleapis.com/chromium-browser-%BRANCH%/%OS%/LAST_CHANGE

set COMMAND_CURL_FORVERSION=curl.exe --silent --http2 --ipv4 --anyauth --insecure --location-trusted --ssl-allow-beast --ssl-no-revoke --url "%URL_LASTCHANGE%"

set VERSION=
for /f "tokens=*" %%a in ('call %COMMAND_CURL_FORVERSION% 2^>^&1') do (set VERSION=%%a)
::error handling
if ["%VERSION%"] == [""] ( goto NOVERSION )
set URL_DOWNLOAD=%PROTOCOL%://storage.googleapis.com/chromium-browser-%BRANCH%/%OS%/%VERSION%/%FILE%

echo.
echo Got Latest-Version: ^>%VERSION%^< ^[Branch:%BRANCH%/OS:%OS%^]
::--------------------------------------------------------------------------------


::you should enable one-of-your-prefered downloaders.
::goto DOWNLOAD_CURL
::goto DOWNLOAD_WGET
::goto DOWNLOAD_ORBITDOWNLOADER
goto DOWNLOAD_ARIA2C



::you should not reach here, unless
::you've forgot to enable one of the "downloader lines" (above)...
goto NODOWNLOADER


::--------------------------------------------------------------------------------
:NOVERSION
  echo ERROR: could not get the latest version...
  goto EXIT

:NODOWNLOADER
  echo ERROR: please enable one of the downloader lines..
  goto EXIT


:DOWNLOAD_CURL
  echo Start Download using cURL...
  call curl.exe --verbose --http2 --ipv4 --ignore-content-length ^
                --anyauth --insecure --location-trusted          ^
                --ssl-allow-beast --ssl-no-revoke --tcp-fastopen ^
                --tcp-nodelay --use-ascii --url "%URL_DOWNLOAD%"
  goto EXIT


:DOWNLOAD_WGET
  echo Start Download using wGET...
  call wget.exe --directory-prefix="." --debug --user-agent="Mozilla/5.0 Chrome" --continue ^
                --server-response --no-check-certificate --secure-protocol=auto  "%URL_DOWNLOAD%"
  goto EXIT


:DOWNLOAD_ARIA2C
  echo Start Download using Aria2C...
  call aria2c.exe --allow-overwrite=true         --auto-file-renaming=false         --check-certificate=false        ^
                  --check-integrity=false        --connect-timeout=120              --console-log-level=notice       ^
                  --continue=true                --dir="."                          --disable-ipv6=true              ^
                  --enable-http-keep-alive=true  --enable-http-pipelining=true      --file-allocation=prealloc       ^
                  --http-auth-challenge=false    --human-readable=true              --max-concurrent-downloads=16    ^
                  --max-connection-per-server=16 --max-tries=3                      --min-split-size=1M              ^
                  --retry-wait=1                 --rpc-secure=false                 --split=8                        ^
                  --timeout=120                  --user-agent="Mozilla/5.0 Chrome"  "%URL_DOWNLOAD%"
  goto EXIT


:DOWNLOAD_ORBITDOWNLOADER
  echo Start Download using OrbitDownloader...
  call "C:\Program Files (x86)\Orbitdownloader\orbitdm.exe" "%URL_DOWNLOAD%"
  goto EXIT


:EXIT  
  echo.
  echo Done.
  pause


::--------------------------------------------------------------------------------------------
::--------------------------------------------------------------------------------------------
::
::   - "http"           - http protocol is faster to connect and download with OrbitDownloader and wGet, it also means your PC won't preform certificate exchange with the remote machine.
::   - "snapshots"      - snapshots is newer, "continuous" is more stable (but might be very old).
::   - "OS" and "FILE"  - are what you want to download
::
::
:: snapshots    - newest (unstable) newest code-changes - passed unit-tests + compilation.
:: continuous   - old    (stable)                       - passed unit-tests + compilation + test-suits.
:: ------------------------------------------------------------------------------------------------------
::   branch   |  branch description           |  version-based build
:: ___________|_______________________________|_____________________________________________________________________________________________
::   Win_x64  |  Chromium Installer (64-bit)  |  storage.googleapis.com/chromium-browser-continuous/Win_x64/{version}/mini_installer.exe  
::   Win_x64  |  Chromium Package (64-bit)    |  storage.googleapis.com/chromium-browser-continuous/Win_x64/{version}/chrome-win32.zip    
::   Win      |  Chromium Installer (32-bit)  |  storage.googleapis.com/chromium-browser-continuous/Win/{version}/mini_installer.exe
::   Win      |  Chromium Package (64-bit)    |  storage.googleapis.com/chromium-browser-continuous/Win/{version}/chrome-win32.zip    
::
::
::------------------------------------------------------
::- SCRIPT WAS WRITTEN AND MAINTAINED BY ELAD KARAKO.  -
::- LAST UPDATED: JULY, 2017. FREE TO USE UNDER GNU.   -
::------------------------------------------------------

Download tools..

Avoid Chrome’s ‘no-referrers’ And ‘reduced-referrer-granularity’

Do not use --no-referrers and --reduced-referrer-granularity command-line switches with chrome.exe (neither Google-Chrome nor Chromium).

There is an old bug that will f**k up the rendering AND the network engines,
and that will render some websites useless/ non-reactive.

– Mostly those whom are using ajax-login/dynamic (in DOM) cookie updates.

You CAN (and should) use the chrome://flags/#reduced-referrer-granularity flag instead.

Browser’s Pixel Density

Firefox:
about:config, layout.css.devPixelsPerPx, change from -1.0 to something like 1.4 (it’s a string), will change immediately.

Chrome:
command-line switch to chrome.exe, use --force-device-scale-factor="1.2" (for example).

It may help you with larger screens (a.k.a HiDPI displays)
or simply to adjust your display for a better visibility.

Don’t Use Chrome Command-Line Switch `enable-gpu-memory-buffer-compositor-resources` It Will Break Your HTML5 Videos!

For Chrome/Chromium.

When you “talk to the video-renderer”, to specify that all compositor resources should be backed by GPU memory buffers,
You use the “feature flag” --enable-gpu-memory-buffer-compositor-resources,
while good for various developing aspects, it will show you green video screen instead of the video (on YouTube).

Please do not use it for now.

Chromium Code-Search

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/

https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?q=_switches.cc&sq=package:chromium&dr

https://chromium.googlesource.com/chromium/src/+/master/ui/gl/gl_switches.cc

raw content:

https://cs.chromium.org/codesearch/f/chromium/src/ui/gl/gl_switches.cc?cl=0


https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?q=_switches.cc&sq=package:chromium&dr
https://chromium.googlesource.com/chromium/src/+/master/ui/gl/gl_switches.cc
https://cs.chromium.org/codesearch/f/chromium/src/ui/gl/gl_switches.cc?cl=0

for example, here are all the “switches” files, in raw mode, which may help you include them in a script using cURL or wGet:

https://cs.chromium.org/codesearch/f/chromium/src/android_webview/common/aw_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ash/common/ash_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/base/base_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/base/i18n/base_i18n_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/base/test/test_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/blimp/client/core/switches/blimp_client_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chrome/browser/supervised_user/experimental/supervised_user_filtering_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chrome/common/chrome_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chrome/test/base/test_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chromecast/base/chromecast_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chromecast/net/net_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/chromeos/chromeos_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/autofill/core/common/autofill_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/browser_sync/browser_sync_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/component_updater/component_updater_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/crash/content/app/crash_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/crash/content/app/crashpad_win.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/dom_distiller/core/dom_distiller_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/error_page/common/error_page_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/feedback/feedback_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/flags_ui/flags_ui_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/google/core/browser/google_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/infobars/core/infobars_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/invalidation/impl/invalidation_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/metrics/metrics_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/nacl/common/nacl_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/os_crypt/os_crypt_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/policy/core/common/policy_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/precache/core/precache_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/search/search_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/search_engines/search_engines_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/signin/core/common/profile_management_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/signin/core/common/signin_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/sync/driver/sync_driver_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/tracing/common/tracing_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/translate/core/common/translate_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/components/variations/variations_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/content/public/common/content_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/content/shell/common/layout_test/layout_test_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/content/shell/common/shell_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/extensions/common/feature_switch.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/google_apis/gaia/gaia_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/google_apis/gcm/engine/gservices_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/gpu/command_buffer/client/gpu_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/gpu/config/gpu_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/headless/app/headless_shell_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ios/chrome/browser/chrome_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/media/base/media_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/media/midi/midi_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ppapi/shared_impl/ppapi_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/app_list/app_list_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/base/ui_base_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/compositor/compositor_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/display/display_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/events/event_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/gfx/x/x11_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/gl/gl_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/keyboard/keyboard_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/message_center/message_center_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/native_theme/native_theme_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/ozone/public/ozone_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/views/views_switches.cc?cl=0
https://cs.chromium.org/codesearch/f/chromium/src/ui/wm/core/wm_core_switches.cc?cl=0

also may be useful:

https://cs.chromium.org/codesearch/f/chromium/src/chrome/app/chrome_exe_main_win.cc?cl=0

this windows-batch script will download and append each of the files, to a single “switches.cc” file, then it will open it with Notepad++.
(Just put all the files in “switches_urls.txt” file, place wGet.exe somewhere and modify the path to Notepad++.exe)

@echo off
::cleanup
if exist switches.cc   del /f /q switches.cc   >nul

::download
call d:\DOS\wGet\wget.exe         ^
--input-file="switches_urls.txt"  ^
--user-agent="Mozilla/5"          ^
--no-check-certificate            ^
--secure-protocol="auto"          ^
--auth-no-challenge               ^
--no-directories                  ^
--directory-prefix=.              ^
--output-document="switches.cc"

::open for viewing (optional)
call "D:\Software\Notepad++\Notepad++.exe" switches.cc

Chromium API Keys

When you build Chromium yourself, or download a Chromium nightly-build, you need to provide API-key, a secret-phrase and a client-id,
running Chromium without either of those three phrases will seriously compromise Chromium’s functionality.

The is a sort of “inner-Google” page on how to generate, and use the API-Keys needed to make Chromium a properly, fully functional Chrome-compatible browser (including Syncing your bookmarks and other stuff..)

There is an issue, however, with that page (https://www.chromium.org/developers/how-tos/api-keys) which has not been-updated for a while, especially on the names of the API-services, one, needs to enable in-order to use Chromium in a fully functional mode,

icompile.eladkarako.com_google_console_api_services_list_helper_for_chromium_api_keys

I’ve gathered those services (including a direct link for you to use in-order to activate it)
the following list (Google API-console) is ordered as:

– Name.
– Description.
– URL.

the list of API-services is sorted (A,B,C..) by the Name of the API-service.

Continue reading

Stuff And Cache You Should Probably Delete From Your Google-Chrome

Either do it manually,
or add few “include” items to your CCleaner configuration-file.

first let’s break the profile-location for each of the operating-systems supported (Windows XP, Windows 7 and later, MacOS and Linux based – not including ChromeOS)

Windows (XP, 7 and later..)
C:\Documents and Settings\Elad\Local Settings\Application Data\Chromium\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome Canary\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome SxS\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome\User Data\
C:\Users\Elad\AppData\Local\Chromium\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome Canary\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome SxS\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome\User Data\

Mac OS X:
~/Library/Application Support/Google/Chrome Canary/
~/Library/Application Support/Google/Chrome SxS/
~/Library/Application Support/Google/Chrome/

Linux:
~/.config/google-chrome/

the folder-location you should empty-recursively or (simply delete the entire folder – it will be regenerated on next Chrome run) – sorry for the slash direction, on Mac/Linux just switch \ to / :)

\Crash Reports\
\Crashpad\
\Default\Application Cache\
\Default\Cache\
\Default\File System\
\Default\GPUCache\
\Default\IndexedDB\
\Default\Local Storage\
\Default\Media Cache\
\Default\Pepper Data\
\Default\Service Worker\ScriptCache\
\Default\Session Storage\
\ShaderCache\

You probably want to switch from Elad to your user-name,
here is an example on how it should look inside (for example) ccleaner.ini file:
Include8=PATH|C:\Documents and Settings\Elad\Local Settings\Application Data\Chromium\User Data\Default\Cache\|*.*|RECURSE

feel free to run the following code in your console,
to generate a proper list which you can add to your CCleaner (or any batch file for example..)

when copy&paste don’t forget to
– change your user-name to something other than ‘Elad’, unless your name is ‘Elad’ too, in which case – this is awesome!! (you can send me email to say hello)
– remove the prefix and suffix of " chars from console :)
– make sure the start_from is indeed starting from first-new index inline,
this is tricky since ccleaner.ini is not sorted nicely, so you better drop its content into EditPlus and sort it by “numeric value”,
quickly find which one is the last line starting with “IncludeXXXXX=” the start_from should be this index plus one,
for example if your last “IncludeXX” line is Include41=PATH|C:\Users\Elad\AppData\Roaming\Macromedia\Flash Player\#SharedObjects|*.*|RECURSE – change the start index from 15 to 42 :)

<_p_r_e_>eJy9Vt1P2zAQf6/U/+HUl7Qla7RpexkfEms7hrRJiAztgaDKSq6pwbEt22Ew4H+f3SRNoEk1pImHqs59/e5+d77kQCoERnh6OLgmt0THikozOOr3hsucx4YKPlSoc2Z8kEosKcMFEzFxisViKViCSvtgxOI3ldiQ5BrVgpMMfdCGKLNYKpGNHvo9gGAMXKiMMPoHYRw40cYaDuvzRKFkJMZhcBlFUXC1F6S+5432nUNnLjZAp26SEVmXpUcPoNDkioPeQHlzRhKvkf5oH54cpAMtiLAIl1elpBtqKdScxKsarsu04AS2KNyO8MKicqzymshcrzphYA+8KPLs38sw+0WYp+KwXWwZ/Rl31GDmA+UJ3lVpBIFNGPCOZJKhfT7lMcsT/Pjh8Oz457fH6efownKqI0dwdCzljBgSfbdZsmi6srNB82xtAWvFDJfEokanDgKT2ZfH8WT8eD6fXpyH8wKw7J1XArnSQqMoT4f1wFlZkaQrv0jE2bn0a0K8ZmyvZgGgjYdrQfnQi7gdRDfJGblBi2EEEGCCp8CoNu8YtVK9zqaccPeLBdeC4YSJdFjV4GK6cxNwXVet6veeSnOeM+ZOfvF4WQ0AgGf5jWYizjPkRgPhCYRojMXXUUF5wXVDanvAaDEkBed1H+pGeBWE/38gToRIGZZQCFPCibp/O7zwLnwzsB1AxU0o41Z3obwM/9KFnf6vpfg1wXbz94pI21GuugZbEb2Cc5RCGf0M0Smk3dYNWbU2njVnarcotlp1a77aHQrhvbaLolV/cnbR7bxZWq3aco6MUCRt9/+BCSU70j5DKVtasNGHqG5pjPBLqBtU9nn9Uu+OF6LWjqiWnMIVse+IpmuzTwPX6kFD8P5Tvzdyq+wgsN8VR38BwMGgaA==

which will generate about 118 items:

<_p_r_e_>eJy9201r20AQBuB7of/B5xxarfVdQiG10zTQQogaetFlkbaxqCwJSS4J5Mc3aZOGgKTZmZ3J1Vi7b4TneWGXHHe9+fj2zXlT1IfSqPDi5PuXu82HfNsWh71pxmGlm3KVmXGsmushP611mX9tC10/f3bSdXVV6LFqm9VWjzrf7Pp2Xx32+dVg+sePej3sVpema/txyO+O3h3dXZ5uri6z0+e9I8m9u/tnp7eNhbbdmp/6UI8vvrvRxc7M5EiEcyztnQrv/bmqzSq7HUazn06w9oQTnF1cLbyAtRLe/rwpzY0pt59m9l8L7//46Nj2+nruHfjCGb6ZstJLI7AOhBNcmK57+mw6gZR/Twky0/+uCrP60fa/TJ9nRV9149IrkULxOdAwPHxv+achZWS206Xpl/5+FhXP2va6Nv8CmPtfYKP7W1w5rVmEtMkxW1Q+C5FABGRp+SxuWmZaysHip2UOsMx8Fkkt0ywXm89CqmUUoOR8Flwts1gUns9iq2UesPx8FmMt04BF6L+Gu9RS9F8DY1RBBq9hM1iWgYDG2U2Ga8pAgOKJELM1GQjg+3J/ZEcGAgRPB1oKIWDvdAiwHQMBdqejLFdjIADudA6gFwMBa6eDWJRiIGDrdBiwEUMBVKejgHUYistK7cJQnFtUEYbi+oItGPJ7i2vAkN9a6/YL+XGlN1/ILyyu9UJ+WSmNF/Kbim67iB9TfNNF/IzSWi7iV5PScBG/lpR2i0TFpDZbJMooqtUiUVXBRov+O/rw0ONu98v/ffrvrsQrtyghLzzbQFFKWRPZLLHnssnSwsplYbAJ4rXL8svCx77L2oDcceCyuIXIceiyAShtHLksDwoakyaUKmNMGluUeDFpikHJEnhu3e9qEniGnS5iEniIeW9ZEniy3a9QEnjCue5HEnjWWS4/EnjoeW42Enj8+a4tEnj6ue4kElgBrguH1FkGqqapMxcoWVNnPUBlU6wX6EP+FIsF5gQ/xfLgdDyfYpFAn72nWB2IB+spFgbKqXmKJYF0JK48LAfkA2/lYeefeJytPOzkEw+rlec2/1RIleemAopR5bkpASKqPCQMOEGVh1TBmk/lIR2g26k8pAY4OJVCKkBRUynk/KPJVAo5+AQvFXLkiVYq5ISTnFTIySYZqejTTfZR0UceZ6OiCzDv4vH7h38V+AP0XDnX

naturally you won't need all of them,
but you might do!

especially since:
- Chromium, Chrome and Chrome Canary can live in same computer quite happily :]
- folders that won't exist would simply be skipped,
- you might use the portable ccleaner version, where you might want to move the installation around few computers (on DiskOnKey or network location for example)
--- in this case you might even want to re-run the script for each user-name used (including Admin/Administrator/other.. accounts)
- better not use those fancy
%Profile% and other current profile shortcuts, the web is filled with stories about cases where CCleaner has emptied the entire hard-drive or user accounts (desktop and all!!!) because of “won’t fix” bug that (apparently still exist in newer versions).
— so don’t take a change and only use direct-folder names…

Force Chrome Password Saving By Removing Event Handlers – The JSNinja Way!!!

(function (new_item) {
  document.querySelector('html').style.display="none"; //limit repaint.

  Array.prototype.forEach.call(document.querySelectorAll("*"), function (item) {
    new_item = item.cloneNode(true);
    item.parentNode.replaceChild(new_item, item);
  })

  document.querySelector('html').style.display="inherit";
}());

a more advanced method is removing the textual event-attribute,
but it is needed to be done AFTER the clone method (or all the attributes will be back… :( )

NodeList.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.map = Array.prototype.map;

var attributes, new_element;

document.querySelectorAll("*").forEach(function(element){
  attributes = Object.keys(element.attributes).map(function(key_index){
    return element.attributes[key_index].nodeName
  });

  attributes = attributes.filter(function(attribute){ return 0 === attribute.toLowerCase().indexOf("on") }); /* keep similar to events */

  /* remove event-handlers (dom level 2 and 3) */
  new_element = element.cloneNode(true);
  element.parentNode.replaceChild(new_element, element);

  attributes.forEach(function(attribute){ 
    //element[attribute] = null; //remove reference to ease up memory (override with empty) - event as DOM-handle.  --not needed (clone method is more effictive)
    element.removeAttribute(attribute); //remove event text - event as attribute
  });

  
})

at this point the page (unless continuously renewing the event handlers..) is event free, placing the username, password, etc.. and submitting the form (either by submit button, which almost always has a non-ajax alternative, even on full ajax page, to better support older browsers – or executing a javascript code manually from console) will trigger Chrome’s password saving mechanism,
you are not necessarily need to be successfully logged-in,
all it means is that the login-data will be available next time you’ll be visiting the page, and then, naturally use the page without any modification (as it is)…

Bring Adobe Flash Back To Chromium (Solved)

ahhh… I had to figure out this one for myself from the source-code of Chromium (Chrome) project at:
http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc and http://src.chromium.org/svn/trunk/src/base/base_switches.cc… :(

Apparently-
New Chromium versions does not have Flash anymore!
– Chrome (regular and Canary) still does.

also, and there are no-people figuring out the solution yet, (as far as Googling around shows..)
so this post should be the first one to explain how to re-enable Adobe Flash on New Chromium installations.

it should be compatible with Windows, Mac and Linux installations.

Chromium not just disable Flash, but it does not ship with the ‘pepflashplayer.dll’,
in fact- the folder, named PepperFlash, which is the code-name for the embedded plugin for Flash, is empty:

icompile.eladkarako.com_bring_flash_back_to_chromium_solved__empty_pepperflash_folder

you can look for pepflashplayer.dll in the Google-Chrome-Canary or regular versions and copy it to the folder but it won’t do anything (check using chrome://flash/)
icompile.eladkarako.com_bring_flash_back_to_chromium_solved__no_flash

for Chromium’s plugin-engine to identify the plugin, you’ll need to use some command-line switches,
but first let us play smart, assuming you’ll be updating Chromium somewhere in the future, the application folder will get overwritten so we’re not going to play with files and folders,
lets use the official Adobe plugin!

– download the latest Flash version from the http://labs.adobe.com/downloads/flashplayer.html
I currently developing some video-players with Flash fallback, so I’m using the “+Debugger” version.. but feel free to download the regular one.

its best for you to first download the uninstaller: http://labsdownload.adobe.com/pub/labs/flashruntimes/flashplayer/flashplayer17_uninstall_win.exe
run it to clean the old versions (make all of the browsers are closed, even their background processes, just use task-manager and kill chrome.exe firefox.exe and iexplore.exe if any..)

then the IE version:
http://labsdownload.adobe.com/pub/labs/flashruntimes/flashplayer/flashplayer17_debug_win_ax.exe, and install it.

then the “other” browsers version:
http://labsdownload.adobe.com/pub/labs/flashruntimes/flashplayer/flashplayer17_debug_win_pi.exe, and install it.

and the “other other” browsers version:
http://labsdownload.adobe.com/pub/labs/flashruntimes/flashplayer/flashplayer17_debug_win_ppapi.exe, and install it too.

icompile.eladkarako.com_bring_flash_back_to_chromium_solved__what_to_download

in a second, we will be adding some command-line argument to Chromium, but first we need to find out where are the pepflashplayer{architecture}_version_ver._ver._ver.dll is located, and what is their named:

there are two folders:

C:\Windows\System32\Macromed\Flash\

and

C:\Windows\SysWOW64\Macromed\Flash\

one is holding the x32 version of Flash, and the other is holding the x64 version.
you can visit chrome://chrome/
to see what version you are using, I’m using the x64 version of Chromium for windows..
icompile.eladkarako.com_bring_flash_back_to_chromium_solved__what_is_your_browser_architecture

normally the C:\Windows\System32\Macromed\Flash holds the x32 version and the C:\Windows\SysWOW64\Macromed\Flash\ has the x64 version.

right! so the x64 version it is,

WAIT!!!
Adobe guys had a bug in the installation script, and the DLL FILES location are upside-down:
icompile.eladkarako.com_bring_flash_back_to_chromium_solved__official_adobe_versions_of_pepperflash

ok, so now we’ll be using two switches, one to disable the embedded-plugin (even that it is “not there”) and the other one to force load a flash-plugin from C:\Windows\System32\Macromed\Flash folder.

here is an example for the command line to load Chromium, with Flash support, (again):

C:\Users\Elad\AppData\Local\Chromium\Application\chrome.exe --disable-bundled-ppapi-flash --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\pepflashplayer64_17_0_0_93.dll"

you may put it in a cmd file, or just create a shortcut for chrome.exe and after “OK”‘ing it, just re-edit it adding a --disable-bundled-ppapi-flash --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\pepflashplayer64_17_0_0_93.dll" at the end.

sometimes sending arguments is hard in windows, most of the time there is a lot of inverted commas confusion and mix-ups.

you can download the exe and the ini file from my github page:
https://github.com/eladkarako/iniRun/tree/master/real_world_example

after you’ll run the exe a Chromium process will be created with the arguments passed directly to the Windows-API (so- FAST!) re-open the chrome://flash/ page, and see something like that:

icompile.eladkarako.com_bring_flash_back_to_chromium_solved__flash_loaded_x64bit

enjoy!

JavaScript Beautiful Code Part #2/3 – Proper Coding – Avoiding Implicit Type Conversion

icompile.eladkarako.com_i_always_follow_the_proper_dress_codeMaybe only best used @ the end-point compile-script) to minify/obfuscate your code even more..

point mentioning that those *might* gives you a little street credit, but are considered a really bad practice,
and in no-way you should use those in actual live-code, at least, out of common courtesy for your fellow developers :]

icompile.eladkarako.com_beautiful_code_animation

  • :( x = !!y;
  • :) x = Boolean(y);

  • :( x = +y;
  • :) x = Number(y);

  • :( x = '' + y;
  • :) x = String(y);

  • :( x = ~s.indexOf('.');
  • :) x = s.indexOf('.') !== -1;

consider reading more about:
JSCS (JavaScript Code Style)https://www.npmjs.com/package/jscs
GJSLint (Google JavaScript Linter) https://developers.google.com/closure/utilities/docs/linter_howto

if you see those abominations,
be a pal, and fix it :)

Chromium Installer – Download Latest Nightly-Build Snapshot

figured it out.

1.
get latest revision number from this url: http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE

2.
concat it to this url, to get into the FTP of this (meaning the latest) revision
http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/put revision number here/

I’ve made a small VB6 program that uses Win32 API to download the latest revision number and send it to the STDOUT,
and a CMD (batch file) that reads it and use wGet to download the execute.

wget has custom settings like using reffer url, cookie, user-agent, avoiding cache, re-write the mime-type, longer keep-alive, tring few times, downloading backup in case of an error- can re download from the same point,
all like the execute was downloaded from a browser.

::  browse
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/144914/
::  for more information.

@echo off
::static information init.
set sUserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
set sUrl_Protocol=https
set sUrl_Base=commondatastorage.googleapis.com/chromium-browser-continuous/Win
set sUrl_FileName=mini_installer.exe



setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    
    ::dynamic information init.
    set sReferrer="http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/%sVersionNumber%/"
    set sCookie="http://o-o.preferred.fra07t11.v8.cache8.c.bigcache.googleapis.com/chromium-browser-continuous/Win/%sVersionNumber%/mini_installer.exe?ms=tsu&mt=1340990464&cms_redirect=yes&redirect_counter=2"

    ::download execute
    wget "%sUrl_Protocol%://%sUrl_Base%/%sVersionNumber%/%sUrl_FileName%"                                                   ^
                                                                            --no-check-certificate                          ^
                                                                            --wait=2                                        ^
                                                                            --referer=%sReferrer%                           ^
                                                                            --timestamping                                  ^
                                                                            --debug                                         ^
                                                                            --continue                                      ^
                                                                            --no-cache                                      ^
                                                                            --no-cookies                                    ^
                                                                            --no-dns-cache                                  ^
                                                                            --server-response                               ^
                                                                            --auth-no-challenge                             ^
                                                                            --directory-prefix=.                            ^
                                                                            --header="Accept: application/octet-stream"     ^
                                                                            --header="Accept: application/x-msdos-program"  ^
                                                                            --header="Keep-Alive: 300"                      ^

endlocal

pause

to use the script you’ll need the small Execute or any other way of downloading and reading the content of the latest revision number (you can use “curl” compiled for windows, or something…)

and wGet (compiled for win32) placed in the same folder as the script or in the PATH.
download it here:
getRemoteFileTextContent.rar

p.s.

you can have all the new command-line switches for the newest latest version of chromium put in a text file and viewed by notepad++.
use the following CMD (batch) script:

@echo off
rem   set command-line arguments.
set sURL1=http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc
set sURL2=http://src.chromium.org/svn/trunk/src/base/base_switches.cc
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTBDFff GTB7.0 (.NET CLR 3.5.30729)"

set sFile=switches.cc

rem   remove old files.
if exist %sFile%   del /f /q %sFile%   >nul

rem   download.
wget --directory-prefix=. --user-agent=%sUserAgent% --output-document=%sFile% %sURL1% %sURL2%
rem ren %sFile% %sFile%_

start "D:\Software\Notepad++\Notepad++.exe" "%CD%\%sFile%"

you will need to modify the full url to Notepad++, or put its path in your PATH variable and just use “Notepad++.exe”, you will also need a wget compiled for win32 platform (or x64) just google it.

____—-____—-
March 2014: here is a working update:
it uses wGet, but you can also throw the link into any parallel download manager to speed things up a little, it uses a session cookie to fool the web-server a little bit..

::  browse
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/144914/
::  for more information.


::static information init.
set sUserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
set sUrl_Protocol=https
set sUrl_Base=commondatastorage.googleapis.com/chromium-browser-continuous/Win
set sUrl_FileName=mini_installer.exe
set sOrbitDownloaderExeFullPath=C:\Program Files (x86)\Orbitdownloader\orbitdm.exe


setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    
    ::dynamic information init.
    set sReferrer="http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/%sVersionNumber%/"
    set sCookie="http://o-o.preferred.fra07t11.v8.cache8.c.bigcache.googleapis.com/chromium-browser-continuous/Win/%sVersionNumber%/mini_installer.exe?ms=tsu&mt=1340990464&cms_redirect=yes&redirect_counter=2"

    set sURL=%sUrl_Protocol%://%sUrl_Base%/%sVersionNumber%/%sUrl_FileName%



    ::option #1.
    ::-------------------------------------------
    wget --no-check-certificate                          ^
         --wait=2                                        ^
         --referer=%sReferrer%                           ^
         --timestamping                                  ^
         --debug                                         ^
         --continue                                      ^
         --no-cache                                      ^
         --no-cookies                                    ^
         --no-dns-cache                                  ^
         --server-response                               ^
         --auth-no-challenge                             ^
         --directory-prefix=.                            ^
         --header="Accept: application/octet-stream"     ^
         --header="Accept: application/x-msdos-program"  ^
         --header="Keep-Alive: 300"                      ^
         "%sURL%"
    
    ::option #2.
    ::-------------------------------------------
    ::call "%sOrbitDownloaderExeFullPath%" "%sURL%"
    
endlocal

Chromium Browser – The Future Of Google Chrome


Chromium is the code-name for Google Chrome development project, the nightly-builds are available for download, and are, mostly, fully functional.

home page for the project.
new builds are available to download here.

I’ve made download script, and a small vb6 program to find the latest version, to make it work you would need those 3 things:
1. wGet.
2. this program: Latest Chromium URL.
3. the following script into a blank CMD (or BAT) file:

@echo off
if exist mini_installer.exe del /f /q mini_installer.exe
setlocal enableextensions
for /f "tokens=*" %%a in ('.\LatestChromiumURL.exe') do (set sURL=%%a)
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6"
wget --directory-prefix=. --user-agent=%sUserAgent% %sURL%
endlocal
pause

4. put the (1),