Initial add of content and themes repositories; remove update scripts

parent 2bda8481
Pipeline #854 canceled with stages
2016-06-22 Major update to how we’re handling Google. Much more granular block rules. Fixes Google Maps embeds & Recaptcha.
2016-06-11 Blocking rules now more specific. Fixed Google images, eBay images issues. Better performance.
2016-06-08 Fixed Google News.
2016-06-07 Blocking flite.com (full-screen video doorslam)
2016-06-06 Fixed yimg tracker blocking Yahoo properties.
2016-06-05 Fixed Facebook image uploads.
2016-06-04 Fixed Twitter logins, now blocking Google AdSense on StartPage.com
2016-06-03 Initial release.
# Contributing Content to Better
**Thank you for your interest in contributing to Better.**
All content submitted to this repository is licensed under a Creative Commons Attribution-ShareAlike 4.0 International Public License.
You do *not* have to sign the [Better Contribution License Agreement](https://source.ind.ie/better/better/blob/master/CONTRIBUTING.md) to contribute content to this repository. (This is because Creative Commons Attribution-ShareAlike 4.0 International Public License is compatible with the App Store.)
This diff is collapsed.
# Better activation test rule.
## Important!
**Do not edit or remove!** This rule is essential for the proper functioning of the iOS app.
This rule blocks the `test.js` script. The Better iOS app loads the `index.html` file which tries to load this script. If the blocker is inactive, the script will load and the browser will be redirected to a URL that signals that the blocker is inactive. If blocked, execution falls through to some inline JavaScript that forwards the browser to a URL that signals that the blocker is active.
Even though this rule is hardcoded into the blockerList.json that’s in the Blocker content blocker extension, that’s only used until the actual data is downloaded via Git. After that, the blockerList.json file from the data-for-apps repository is used. This is the file that adds the rule to that (main) blocker list file.
```mson
- trigger:
- url-filter: localhost:8000/test.js
- load-type: first-party
- action:
- type: block
```
#!/bin/sh
#
# Deploys content changes to production.
# (Auto-generates tag label and pushes tags to live.)
#
# (Make sure you have commited your changes and saved them to production using the ./save script first.)
#
set -e
# Aborts the script and decrements the deployment counter
abortGracefully(){
currentDayDeploymentCount=$(( currentDayDeploymentCount - 1 ))
echo "$currentDayDeploymentCount" > "$counterFilePath"
exit 1
}
dateStamp=$(date "+%Y%m%d")
counterFolderPath="/tmp/better-content"
counterFilePath="${counterFolderPath}/$dateStamp"
#
# Set up the counter, if necessary.
#
mkdir -p "$counterFolderPath"
if ! [ -f "$counterFilePath" ]; then
# Counter does not exist for this day, create it.
echo 0 > "$counterFilePath"
fi
#
# Increment the counter.
#
currentDayDeploymentCount=$(( $(cat "$counterFilePath") + 1 ))
# Persist the counter.
echo "$currentDayDeploymentCount" > "$counterFilePath"
# Format the counter (padded to three spaces).
printf -v formattedCurrentDayDeploymentCount "%03d" $currentDayDeploymentCount
# Create the git tag label
gitTagLabel="${dateStamp}-${formattedCurrentDayDeploymentCount}"
echo "\nTagging: ${gitTagLabel}"
#
# Create a default tag message based on the last commit message.
#
tempTagMessageDirectory=/tmp/better-content/
tempTagMessageFilePath="${tempTagMessageDirectory}/tag-commit-message.txt"
mkdir -p $tempTagMessageDirectory
# Not sure if there’s an easier way to get this.
gitDefaultEditor=$(git config -l | grep core.editor | perl -pe 's|^core.editor=||')
lastCommitMessage=$(git log -1 --oneline | perl -pe 's|^.*? ||')
echo "$lastCommitMessage" > "$tempTagMessageFilePath"
# Write out some instructions (so that it also resembles what people normally
# see when git opens up the editor. With an additional line of instructions on
# how to abort the tag.)
echo "\n#\n# Write a message for tag:\n#\t${gitTagLabel}\n# Lines starting with '#' will be ignored.\n#\n# If you’re happy with the default message above, just close this document.\n#\n# To abort deployment, delete all content and save the empty document." >> "$tempTagMessageFilePath"
# Create and open a temporary file to hold the message to pass to git tag later.
$gitDefaultEditor "$tempTagMessageFilePath"
emptyStringMD5=$(md5 -q -s '')
tagMessageMD5=$(md5 -q "$tempTagMessageFilePath")
# Check for empty tag message (this signals that the deployment should be aborted).
if [ "$emptyStringMD5" = "$tagMessageMD5" ]; then
# Person deleted the tag message, abort the tag.
echo "\nAborting deployment due to empty tag message.\n"
abortGracefully
else
echo ''
cat "$tempTagMessageFilePath"
fi
# Create the git tag
git tag -s "$gitTagLabel" --file="$tempTagMessageFilePath"
echo "Deploying…\n"
# Push the git tags
git push live --tags
echo "\nDeployment complete.\n\nSee https://www.better.fyi and https://data.better.fyi for changes.\n"
# All third-party scripts
This rule blocks all third-party scripts. This will break things. Enable only for testing.
<!--
```mson
.*
```
-->
# Better Builder
To get started, please run the `./dev` script.
<h1 class="legal">Legal and Privacy</h1>
**We exist to protect your privacy.**
<h2 id="version">Version 2018.1, as published on 13th September, 2018.</h2>
Our privacy policy is simple (and will stay that way). If we make any changes, we will let you know through the [Ind.ie news](https://ind.ie/news) and social media feeds. As this web site is open source (and all of its content released under a Creative Commons Attribution License), you can also [see a history of all changes](https://source.ind.ie/better/content/commits/master/legal/index.md).
## Privacy Policy
We do not track you. We do not collect or share your personal information.
Privacy is a fundamental human right that your other rights depend on. We exist to design beautiful, everyday things that protect your human rights. So, in a nutshell, our privacy policy is that we exist to protect your privacy.
### Analytics
The only analytics data we have are the server logs saved by default on nginx. We do not use this data, or share it with anybody else.
## Copyright
Better is copyright © 2015-2018 Article 12.
## Trademarks
Ind.ie, the Ind.ie balloon logo, and Better are trademarks of Article 12.
## Licenses
Better is free and open source (FOSS).
All content on the Better web site, excluding our trademarks and unless otherwise stated, is licensed under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/).
[The Better source code](https://source.ind.ie/better), unless otherwise stated, is available under [GNU Affero General Public License (AGPL) Version 3 or Later](http://www.gnu.org/licenses/agpl-3.0.html).
\ No newline at end of file
This diff is collapsed.
#!/bin/sh
set -e
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
echo "\nSaving the work in your ${branch} branch to production…\n"
git push live "$branch"
echo "\nSaved.\n"
if [[ "$branch" == "master" ]]; then
echo "If you have deployment rights, you can ./deploy now.\n"
fi
# **AccuWeather** (accuweather.com)
> “AccuWeather Inc. is an American media company that provides commercial weather forecasting services worldwide.” – [Source](https://en.wikipedia.org/wiki/AccuWeather)