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|||||||remoting-host.msi||||changelog.xml|
set FILE=mini_installer.exe

::stuff you should keep as is.

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

for /f "tokens=*" %%a in ('call %COMMAND_CURL_FORVERSION% 2^>^&1') do (set VERSION=%%a)
::error handling
if ["%VERSION%"] == [""] ( goto NOVERSION )

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

::you should enable one-of-your-prefered downloaders.

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

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

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

  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

  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

  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

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

  echo Done.

::   - "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)  |{version}/mini_installer.exe  
::   Win_x64  |  Chromium Package (64-bit)    |{version}/    
::   Win      |  Chromium Installer (32-bit)  |{version}/mini_installer.exe
::   Win      |  Chromium Package (64-bit)    |{version}/    

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

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

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

raw content:

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

also may be useful:

this windows-batch script will download and append each of the files, to a single “” 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
if exist   del /f /q   >nul

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=.              ^

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

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 ( 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,


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/


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\
\Default\Application Cache\
\Default\File System\
\Default\Local Storage\
\Default\Media Cache\
\Default\Pepper Data\
\Default\Service Worker\ScriptCache\
\Default\Session Storage\

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 :)


which will generate about 118 items:


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."*"), function (item) {
    new_item = item.cloneNode(true);
    item.parentNode.replaceChild(new_item, item);


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; =;

var attributes, new_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);

    //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: and… :(

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:


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/)

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
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:
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:, and install it.

then the “other” browsers version:, and install it.

and the “other other” browsers version:, and install it too.


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:




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

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,

Adobe guys had a bug in the installation script, and the DLL FILES location are upside-down:

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:

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:



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 :]


  • :( 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)
GJSLint (Google JavaScript Linter)

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

Chromium Installer – Download Latest Nightly-Build Snapshot

figured it out.

get latest revision number from this url:

concat it to this url, to get into the FTP of this (meaning the latest) revision 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
::  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_FileName=mini_installer.exe

setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    ::dynamic information init.
    set sReferrer=""
    set sCookie=""

    ::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"                      ^



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:


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=
set sURL2=
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100401 Firefox/3.6.3 GTBDFff GTB7.0 (.NET CLR 3.5.30729)"


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
::  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_FileName=mini_installer.exe
set sOrbitDownloaderExeFullPath=C:\Program Files (x86)\Orbitdownloader\orbitdm.exe

setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    ::dynamic information init.
    set sReferrer=""
    set sCookie=""

    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"                      ^
    ::option #2.
    ::call "%sOrbitDownloaderExeFullPath%" "%sURL%"

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: Gecko/20091201 Firefox/3.5.6"
wget --directory-prefix=. --user-agent=%sUserAgent% %sURL%

4. put the (1),