Skip to content

Commit

Permalink
DD-1144 reinit repo
Browse files Browse the repository at this point in the history
  • Loading branch information
imin314 committed Jan 29, 2021
1 parent 3ed2cf2 commit 7ebfae5
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 2,172 deletions.
25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# 3rd-party-cookies-checker

Hosts external pages for [tpc-checker library](https://www.npmjs.com/package/tpc-checker) on github-pages: https://akropolisio.github.io/3rd-party-cookies-checker.

## Usage
To check if third-party cookies are enabled in browser:
* add an iframe with src attribute set to the above github-pages url,
* use checkTPC() from the tpc-checker library, or make your own implementation to read data from the 'message' event.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<body>
<script>
document.cookie = 's=1;Secure=true;SameSite=None';
document.location = 'read-cookie.html';
</script>
</body>
</html>
28 changes: 3 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
{
"name": "3rd-party-cookies-checker",
"version": "1.0.1",
"description": "External pages for tpc-checker",
"version": "1.0.0",
"repository": "https://github.com/akropolisio/3rd-party-cookies-checker",
"author": "Akropolis",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsc",
"deploy": "gh-pages -d public",
"lint": "eslint . --ext .js,.ts",
"lint:autofix": "eslint . --ext .js,.ts --fix"
},
"devDependencies": {
"@types/node": "^14.14.22",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "^7.18.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-airbnb-typescript-prettier": "^4.1.0",
"eslint-plugin-import": "^2.22.1",
"gh-pages": "^3.1.0",
"prettier": "^2.2.1",
"typescript": "^4.1.3"
}
"license": "MIT"
}
21 changes: 0 additions & 21 deletions public/check-cookies.html

This file was deleted.

18 changes: 0 additions & 18 deletions public/index.html

This file was deleted.

9 changes: 9 additions & 0 deletions read-cookie.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<body>
<script>
(function() {
if (!window.parent) return;
var msg = /s=1/.test(document.cookie) ? '3pc.supported' : '3pc.unsupported';
window.parent.postMessage(msg, '*');
})();
</script>
</body>
33 changes: 0 additions & 33 deletions src/checkCookiesSupport.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/settings.ts

This file was deleted.

12 changes: 0 additions & 12 deletions tsconfig.json

This file was deleted.

Loading

0 comments on commit 7ebfae5

Please sign in to comment.