Download the .zip with this link. The original game can be found at http://orteil.dashnet.org/cookieclicker/. Please note that this is an unofficial file-only host of Cookie Clicker and is not endorsed by Orteil or Playsaurus. This repo contains a few improvements over the ozh repo (see Changes section below).
- Normal link: plasma4.github.io/cookieclicker/
- Modded link: plasma4.github.io/cookieclicker/modded
- Mobile link: plasma4.github.io/cookieclicker/mobile
- To play on a file, extract the files from the
.zipfirst and then visitindex.html/modded.html/mobile.htmldepending on what version you want.
When using index.html, mods are disabled. (In older versions, they would be enabled by default.) This acts identically to the normal version of Cookie Clicker (but without ads; these wouldn't work on a domain not owned by Orteil anyway).
Mod options will only show up if you are visiting modded.html and mobile functionality and mods (not part of the base game, see specific changes below) will only be available in mobile.html. Mobile functionality allows using touchscreen for moving around in the ascend menu and using temple swaps, for example.
This mirror for, errrr, like, educational purpose, either to download for your own offline education or to be played online from http://plasma4.github.io/cookieclicker/ if you cannot "educate" yourself on the original URL. It should also fully work when opened as a file://.
This fork uses Cloudflare's API as a gateway to certain dynamic JSON files used in Cookie Clicker; see getJson in main.js for more details.
Note that index.html, modded.html, and mobile.html have identical code; they are only different to prevent users from accidentally selecting the wrong version. You can access from modded/mobile (without the .html) and automatic detection of if mods/mobile features should be enabled will still occur.
- Removed ads and tracking requests (ads wouldn't work anyway)
- Hardcoded
<style>into HTML, so some mods work properly - Replaced Cloudflare/Google fonts with identical local versions (also reduces tracking)
- Changed
getJsonto work (and minimize requests necessary by hardcoding some), getting around the standardAccess-Control-Allow-Originproblem - Added
<meta charset="UTF-8">tag (prevent ANSI encoding edge cases) - You customizer uses data URIs (allows for identical gameplay through a file)
- Added a new button: "Inject script" (in the Options menu)
- Includes basic management of script injection, such as autoloading and deletion management
- Double tap no longer zooms in; only pinching does
- Pantheon/temple minigame allows you to tap to select/change slots
- Ascend menu and some other touch functionality now works, as if using a mouse
- Cookie now animates and plays sound with touchscreen
- Tooltip "hovering" works by letting you put your finger over something and then moving it away to prevent clicking
Note that these changes do not set Game.mobile to 1, which means that playing with a mouse/touchpad will still fully function (and UI acts less weird). This is technically not leaderboard valid/an "official" way to play the game.
If the original game updates, here is how you can update the mirror:
From the root,
Set up user agent:
-
USER="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36" -
cd img/ -
wget --user-agent="$USER" --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/img/ -
grep -v PARENTDIR index.html | grep '\[IMG' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _imglist.txt -
wget --user-agent="$USER" -N -i _imglist.txt -B http://orteil.dashnet.org/cookieclicker/img/
Similarly, from the root:
cd snd/wget --user-agent="$USER" --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/snd/grep -v PARENTDIR index.html | grep '\[SND' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _sndlist.txtwget --user-agent="$USER" -N -i _sndlist.txt -B http://orteil.dashnet.org/cookieclicker/snd/
Similarly, from the root:
cd loc/wget --user-agent="$USER" --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/loc/grep -v PARENTDIR index.html | grep '\[TXT' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _loclist.txtwget --user-agent="$USER" -i _loclist.txt http://orteil.dashnet.org/cookieclicker/loc/
From the root directory:
- Fetch the updated
index.htmlfile:wget --user-agent="$USER" -O index.html http://orteil.dashnet.org/cookieclicker/ - Fetch the updated
style.cssfile:wget --user-agent="$USER" -O style.css http://orteil.dashnet.org/cookieclicker/style.css - Fetch updated
jsfiles:wget --user-agent="$USER" -i _jslist.txt -B http://orteil.dashnet.org/cookieclicker/ - Scan
index.htmlfor any new<script srcand alsomain.jsfor any new local javascript (egGame.last.minigameUrl). If there are new scripts, update the_jslist.txtaccordingly. - In
main.jsthere is a nonfunctional URL we need to change:- Find
DataDir=window.location.origin+'/data/';, and change toDataDir='https://orteil.dashnet.org/data/';
- Find
If you happen to update, please make a pull request for others to benefit, thanks!
