Permalink
Browse files

u

  • Loading branch information...
eladkarako committed Nov 16, 2018
1 parent 58949b4 commit 4d14313301de3cf365681db8f133193368c89751
@@ -0,0 +1,12 @@
#explicit binary content (reduced diff).
*.exe binary
*.gif binary
*.png binary

#explicit Linux(\n)-EOL.
*.txt text eol=lf

#explicit Windows(\r\n)-EOL.
*.cmd text eol=crlf
*.js text eol=crlf
README.md eol=crlf
@@ -1,2 +1,44 @@
# hosts
HOSTS/AdBlock
<h1><img alt="" width="48" height="48" src="resources/icon.png"/>HOSTS/Ad-Block</h1>

<img alt="" src="resources/icon.gif"/>


Suggested usage: fork it, replace <code>/USERNAME/</code> with your GitHub-username, use links (direct download).

<pre>
https://raw.githubusercontent.com/USERNAME/hosts/master/_raw__hosts.txt
<hr/>
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts0.txt
<hr/>
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_with_localhost.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts0_with_localhost.txt
<hr/>
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_adblock.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_adblock_anti_annoyances_hide.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_adblock_anti_annoyances_block.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_adblock_anti_annoyances_block_inline_script.txt
https://raw.githubusercontent.com/USERNAME/hosts/master/build/hosts_adblock_anti_annoyances_style_inject.txt
</pre>
Or download it all in an archive:
<pre>
https://github.com/USERNAME/hosts/archive/master.zip
</pre>
<hr/>
The <code>_raw__hosts.txt</code> file is just a raw list of the host-domains (without any prefix),
<code>hosts.txt</code> uses <code>127.0.0.1 </code> prefix for each line,
<code>hosts0.txt</code> uses <code>0.0.0.0 </code> prefix for each line,
<code>hosts_with_localhost.txt</code> and <code>hosts0_with_localhost.txt</code> uses the same prefixes but adds an additional entries for machine's self-<code>localhost</code>.
The <code>hosts_adblock.txt</code> has the same content as <code>_raw__hosts.txt</code> built with an additional <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax/">uBlock-filter format</a> file-headers.
<hr/>
For developers - download/clone, modify any of the <code>_raw_...</code> lists and run <code>_builder.js</code> using a NodeJS that is compatible with your operation-system <sup>(for example: <em><a href="https://nodejs.org/download/nightly/v9.1.1-nightly201711075f5ef4226e/win-x86/node.exe">Windows</a></em>)</sup>.
<hr/>
@@ -0,0 +1,87 @@
@echo off

::force UTF-8 support
::chcp 65001 2>nul >nul

::----------------------------------------------------::
:: make sure to browse the path to your `node.exe`, ::
:: show properties, under compatibilities set "ON" ::
:: the checkbox for run as admin. ::
::----------------------------------------------------::


set _NODE=C:\nodejs32\node.exe


::relative path
set _PATH=%~dp0
set _SCPT=_builder.js
set __BLD=build


::to explicit path (long)
set _SCPT="%_PATH%%_SCPT%"
set __BLD="%_PATH%%__BLD%"


::to explicit short path (8.3)
for /f %%a in ("%_NODE%")do (set "_NODE=%%~fsa" )
for /f %%a in ("%_SCPT%")do (set "_SCPT=%%~fsa" )
for /f %%a in ("%__BLD%")do (set "__BLD=%%~fsa" )

::cleanup old build folder.
del /q /s /f "%__BLD%" 1>nul 2>nul
del /q /s /f "%__BLD%\" 1>nul 2>nul
del /q /s /f /a:rhisal "%__BLD%\*" 1>nul 2>nul
rmdir /q /s "%__BLD%" 1>nul 2>nul
rmdir /q /s "%__BLD%\" 1>nul 2>nul
echo.
echo DEBUG: cleanup old build folder.
if exist %__BLD% goto BUILD_NOCLEAN
if exist %__BLD%\NUL goto BUILD_NOCLEAN
echo DONE.


::create new empty build folder.
mkdir "%__BLD%" 2>nul >nul
echo.
echo DEBUG: create new empty build folder.
if not exist %__BLD% goto BUILD_NOCREATE
if not exist %__BLD%\NUL goto BUILD_NOCREATE
echo DONE.


echo.
echo DEBUG: running main script ^("%_SCPT%"^) with NodeJS ^("%_NODE%"^).
echo.
call "%_NODE%" "%_SCPT%"
echo.
echo DONE.


echo.
echo DEBUG: all done.


goto EXIT


::------------------------------------------------


:BUILD_NOCLEAN
echo.
echo ERROR: could not delete the "%__BLD%" folder, maybe it is used by another program, try run again.
goto EXIT


:BUILD_NOCREATE
echo.
echo ERROR: could not create the "%__BLD%" folder, try run again.
goto EXIT


:EXIT
echo.
pause

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,9 @@
https://raw.githubusercontent.com/eladkarako/hosts/master/build/hosts_adblock.txt

https://raw.githubusercontent.com/eladkarako/hosts/master/build/hosts_adblock_anti_annoyances_hide.txt

https://raw.githubusercontent.com/eladkarako/hosts/master/build/hosts_adblock_anti_annoyances_block.txt

https://raw.githubusercontent.com/eladkarako/hosts/master/build/hosts_adblock_anti_annoyances_block_inline_script.txt

https://raw.githubusercontent.com/eladkarako/hosts/master/build/hosts_adblock_anti_annoyances_style_inject.txt
BIN +334 KB resources/icon.gif
Binary file not shown.
BIN +24 KB resources/icon.png
Binary file not shown.
@@ -0,0 +1,4 @@
https://github.com/gorhill/uBlock/releases/download/1.17.2/uBlock0.chromium.zip

https://github.com/gorhill/uBlock/releases/download/1.17.2/uBlock0.firefox.xpi

0 comments on commit 4d14313

Please sign in to comment.