<?xml version="1.0" encoding="UTF-8"?>
<!--

    BleachBit
    Copyright (C) 2008-2023 Andrew Ziem
    https://www.bleachbit.org

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.


-->
<cleaner id="palemoon">
  <label>Pale Moon</label>
  <description>Web browser</description>
  <running type="exe" os="unix">palemoon</running>
  <running type="exe" os="windows">palemoon.exe</running>
  <running type="pathname">~/.moonchild productions/pale moon/*/lock</running>
  <var name="base">
    <value os="windows">%AppData%\moonchild productions\value</value>
    <value os="linux">~/.moonchild productions/pale moon</value>
    <value os="freebsd">~/.moonchild productions/pale moon</value>
    <value os="openbsd">~/.moonchild productions/pale moon</value>
  </var>
  <var name="profile">
    <value search="glob" os="windows">%AppData%\moonchild productions\pale moon\Profiles\*</value>
    <value search="glob" os="linux">~/.moonchild productions/pale moon/*</value>
    <value search="glob" os="freebsd">~/.moonchild productions/pale moon/*</value>
    <value search="glob" os="openbsd">~/.moonchild productions/pale moon/*</value>
  </var>
  <option id="backup">
    <label>Backup files</label>
    <description>Delete the backup files</description>
    <action command="delete" search="glob" path="$$profile$$/bookmarkbackups/*.json"/>
    <action command="delete" search="glob" path="$$profile$$/bookmarkbackups/*.jsonlz4"/>
  </option>
  <option id="cache">
    <label>Cache</label>
    <description>Delete the cache</description>
    <action command="delete" search="walk.all" path="~/.cache/moonchild productions/"/>
    <action command="delete" search="walk.all" path="%LocalAppData%\moonchild productions\pale moon\Profiles\*\cache2"/>
    <action command="delete" search="walk.all" path="%LocalAppData%\moonchild productions\pale moon\Profiles\*\jumpListCache"/>
    <action command="delete" search="walk.all" path="%LocalAppData%\moonchild productions\pale moon\Profiles\*\OfflineCache"/>
  </option>
  <option id="cookies">
    <label>Cookies</label>
    <description>Delete cookies, which contain information such as web site preferences, authentication, and tracking identification</description>
    <action command="delete" search="file" path="$$profile$$/cookies.sqlite"/>
    <action command="delete" search="file" path="$$profile$$/cookies.sqlite-shm"/>
    <action command="delete" search="file" path="$$profile$$/cookies.sqlite-wal"/>
    <!-- this deletes contents of the http directories -->
    <!-- this deletes the http directories -->
    <action command="delete" search="walk.all" path="$$profile$$/storage/default/http*"/>
    <action command="delete" search="walk.all" path="$$profile$$/storage/temporary/http*"/>
    <action command="delete" search="glob" path="$$profile$$/storage/default/http*"/>
  </option>
  <option id="crash_reports">
    <label>Crash reports</label>
    <description>Delete the files</description>
    <action command="delete" search="walk.all" path="$$base$$/Crash Reports/"/>
    <action command="delete" search="glob" path="$$profile$$/minidumps/*.dmp"/>
  </option>
  <option id="dom">
    <label translators="DOM=Document Object Model">DOM Storage</label>
    <description>Delete HTML5 cookies</description>
    <action command="delete" search="file" path="$$profile$$/webappsstore.sqlite"/>
    <action command="delete" search="file" path="$$profile$$/webappsstore.sqlite-shm"/>
    <action command="delete" search="file" path="$$profile$$/webappsstore.sqlite-wal"/>
  </option>
  <option id="forms">
    <label>Form history</label>
    <description>A history of forms entered in web sites and in the Search bar</description>
    <action command="delete" search="file" path="$$profile$$/formhistory.sqlite"/>
  </option>
  <option id="passwords">
    <label>Passwords</label>
    <description>A database of usernames and passwords as well as a list of sites that should not store passwords</description>
    <warning>This option will delete your saved passwords.</warning>
    <action command="delete" search="file" path="$$profile$$/logins.json"/>
  </option>
  <option id="session_restore">
    <label>Session restore</label>
    <description>Loads the initial session after the browser closes or crashes</description>
    <!--
example names
sessionstore.js
sessionstore.jsonlz4
sessionstore.bak
sessionstore.bak-20140715214327
sessionstore-1.js
upgrade.jsonlz4-20180905220717
sessionCheckpoints.json
-->
    <action command="delete" search="file" path="$$profile$$/sessionCheckpoints.json"/>
    <action command="delete" search="glob" path="$$profile$$/sessionstore*.js*"/>
    <action command="delete" search="glob" path="$$profile$$/sessionstore.bak*"/>
    <action command="delete" search="glob" path="$$profile$$/sessionstore-backups/previous.js*"/>
    <action command="delete" search="file" path="$$profile$$/sessionstore-backups/recovery.js"/>
    <action command="delete" search="file" path="$$profile$$/sessionstore-backups/previous.bak"/>
    <action command="delete" search="glob" path="$$profile$$/sessionstore-backups/upgrade.js*-20*"/>
  </option>
  <option id="site_preferences">
    <label>Site preferences</label>
    <description>Settings for individual sites</description>
    <action command="delete" search="file" path="$$profile$$/content-prefs.sqlite"/>
  </option>
  <option id="url_history">
    <label>URL history</label>
    <description>List of visited web pages</description>
    <action command="delete" search="file" path="$$profile$$/SiteSecurityServiceState.txt"/>
    <action command="delete" search="file" path="$$profile$$/downloads.sqlite"/>
    <action command="mozilla.url.history" search="file" path="$$profile$$/places.sqlite"/>
  </option>
  <option id="vacuum">
    <label>Vacuum</label>
    <description>Clean database fragmentation to reduce space and improve speed without removing any data</description>
    <action command="sqlite.vacuum" search="glob" path="$$profile$$/*.sqlite"/>
  </option>
</cleaner>
