Skip to content

Commit

Permalink
Upgrade 2024 (#344)
Browse files Browse the repository at this point in the history
* Update Tusk for 2024

* Spinners and clear bad tokens

* Update readme
  • Loading branch information
subdavis authored Jul 31, 2024
1 parent b3d2335 commit 11e6dfe
Show file tree
Hide file tree
Showing 155 changed files with 2,649 additions and 7,082 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ bower_components/

*.travis.yml
manifest.json
demo*
demo*

extension/dist
extension/manifest.json
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# Tusk is no longer actively maintained.

* **Is it still safe?** Yes. As far as the community is aware, Tusk's security model is still the same. You may continue using Tusk, and I will keep the third party integrations (Dropbox, Google Drive, etc.) active. Please contact me through [my website](https://subdavis.com) to report security concerns.
* **Why is it unsuppored?** Because I no longer prefer the keepass ecosystem. I believe version control and data sync should be a core feature of any password manager.
* **Any good alternatives?** I've switched entirely to [Password Store](https://www.passwordstore.org/) + [BrowserPass](https://github.com/browserpass/browserpass-extension) and I'm happier now. If you want something more user friendly, I highly recommend [Bitwarden](https://bitwarden.com/). To remain with Keepass, try [Kee](https://kee.pm) or [KeepassXC-Browser](https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk).
* **Could someone else take over?** If you have a lot of time and are interested in taking over leadership of Tusk, please contact me through [my website](https://subdavis.com) and tell me about yourself and what you'd like to do with Tuisk. It has over 25 thousand active users, and I'm sure they would all love to see the project live on.

----

# Tusk
> A modern, clean keepass browser extension built with Vue.js and kdbxweb. Rebooted from perfectapi/CKP
![Tusk](https://user-images.githubusercontent.com/25948390/45255427-a466f300-b386-11e8-9321-931934faafb4.png "Tusk Logo")

## Back in business

[Read the blog post](https://medium.com/@brandon.a.davis/keepass-tusk-is-back-from-the-dead-a367697212fd) and stay tuned for more updates.

## Installation

**Firefox:** https://addons.mozilla.org/en-GB/firefox/addon/keepass-tusk/
Expand Down
35 changes: 19 additions & 16 deletions background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Settings } from '$services/settings.js'
import { Notifications } from "$services/notifications";

function Background(protectedMemory, settings, notifications) {
console.log('Background worker registered');
chrome.runtime.onInstalled.addListener(settings.upgrade);
chrome.runtime.onStartup.addListener(forgetStuff);

Expand Down Expand Up @@ -52,11 +53,11 @@ function Background(protectedMemory, settings, notifications) {

if (message.m == "showMessage") {
const expire = typeof message.expire !== 'undefined' ? message.expire * 1000 : 60000;
chrome.notifications.create({
chrome.notifications.create(null, {
'type': 'basic',
'iconUrl': '/assets/icons/exported/48x48.png',
'iconUrl': '/assets/48x48.png',
'title': 'Tusk',
'message': message.text
'message': message.text,
}, function(notificationId) {
setTimeout(() => chrome.notifications.clear(notificationId), expire)
})
Expand Down Expand Up @@ -90,10 +91,9 @@ function Background(protectedMemory, settings, notifications) {
});
return;
}
chrome.tabs.executeScript(message.tabId, {
file: "build/inject.build.js",
allFrames: true,
runAt: "document_start"
chrome.scripting.executeScript({
target: { tabId: message.tabId, allFrames: true },
files: ["/dist/contentScripts/index.global.js"],
}, function(result) {
//script injected
console.log("injected")
Expand Down Expand Up @@ -138,7 +138,7 @@ function Background(protectedMemory, settings, notifications) {
});

function forgetStuff() {
console.log("ForgetStuff", new Date())
console.log("Alarm Handler -- Check if we should clear Cache --", new Date())
protectedMemory.clearData('secureCache.entries'); // ALWAYS clear entries.
settings.getAllForgetTimes().then(function(allTimes) {
var now = Date.now();
Expand Down Expand Up @@ -177,14 +177,17 @@ function Background(protectedMemory, settings, notifications) {
}

function clearClipboard() {
var clearClipboard = function(e) {
e.clipboardData.setData('text/plain', "");
e.preventDefault();
document.removeEventListener('copy', clearClipboard); //don't listen anymore
}

document.addEventListener('copy', clearClipboard);
document.execCommand('copy');
// No longer have access to document in this context.
// https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/cookbook.offscreen-clipboard-write
console.log('Clearing clipboard');
// var clearClipboard = function(e) {
// e.clipboardData.setData('text/plain', "");
// e.preventDefault();
// document.removeEventListener('copy', clearClipboard); //don't listen anymore
// }

// document.addEventListener('copy', clearClipboard);
// document.execCommand('copy');
}

function forgetPassword() {
Expand Down
2 changes: 1 addition & 1 deletion background/inject.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isVisible, parseUrl } from '$lib/utils.js'
import { isVisible, parseUrl } from '@/lib/utils.js'
/*
Inject script
Expand Down
74 changes: 0 additions & 74 deletions chrome.manifest.json

This file was deleted.

124 changes: 0 additions & 124 deletions dll/dll.library.js

This file was deleted.

1 change: 0 additions & 1 deletion dll/library-manifest.json

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion firefox.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"client_id" : "08b651fe-3b64-4a5e-aeb7-66d7220ec707"
},
"gdrive": {
"client_id": "876467817034-rlas0hnb5jc9dt1qmp11l6g4724ktoqn.apps.googleusercontent.com"
"client_id": "876467817034-al13p9m2bphgregs0rij76n1tumakcqr.apps.googleusercontent.com"
},
"pcloud": {
"client_id": "1NklWhTApYR"
Expand Down
15 changes: 0 additions & 15 deletions options.html

This file was deleted.

73 changes: 32 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,51 @@
"license": "MIT",
"private": true,
"scripts": {
"prebuild": "npm run clean",
"build": "cross-env NODE_ENV=production webpack --progress --config webpack.config.js",
"build-dll": "cross-env NODE_ENV=dll webpack --config webpack.dll.js --progress",
"dev": "webpack --progress --watch --config webpack.config.js",
"dev-tests": "cross-env NODE_ENV=test webpack --watch --config webpack.test.config.js --progress",
"bundle": "./packer.sh chrome && ./packer.sh firefox",
"clean": "rm -rf build/ *.zip manifest.json demo*"
"clear": "rimraf --glob extension/dist extension/manifest.json 'extension.*'",
"dev": "run-s clear && cross-env NODE_ENV=development run-p 'dev:*'",
"dev:prepare": "esno scripts/prepare.ts",
"dev:web": "vite",
"dev:background": "run-s build:background -- --mode development",
"dev:js": "run-s build:js -- --mode development",
"build": "cross-env NODE_ENV=production run-s clear build:web build:prepare build:background build:js",
"build:prepare": "esno scripts/prepare.ts",
"build:background": "vite build --config vite.config.background.mts",
"build:js": "vite build --config vite.config.content.mts",
"build:web": "vite build",
"pack:zip": "rimraf extension.zip && zip -r extension.zip extension/*"
},
"dependencies": {
"axios": "^0.17.1",
"babel-regenerator-runtime": "^6.5.0",
"base64-arraybuffer": "^0.1.5",
"axios": "^1.7.2",
"base64-arraybuffer": "^1.0.2",
"case": "^1.5.4",
"font-awesome": "^4.7.0",
"json-formatter-js": "^2.2.0",
"kdbxweb": "^1.2.4",
"keeweb": "https://github.com/keeweb/keeweb",
"materialize-css": "^0.100.2",
"materialize-css": "^1.0.0",
"pako": "^1.0.6",
"vue": "^2.4.4",
"vue-simple-spinner": "^1.2.8",
"webdav": "https://github.com/subdavis/webdav-client#fetchfix",
"xmldom": "^0.1.27"
"vue": "2",
"vue-simple-spinner": "^1.2.10",
"webdav": "^5.6.0",
"webextension-polyfill": "^0.12.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.5",
"gulp": "^3.9.1",
"ignore-loader": "^0.1.2",
"mocha": "^4.1.0",
"mocha-loader": "^1.1.2",
"node-sass": "^4.5.3",
"sass-loader": "^6.0.6",
"should": "^13.2.0",
"sinon": "^4.1.4",
"style-loader": "^0.19.0",
"uglifyjs-webpack-plugin": "^1.1.2",
"url-loader": "^0.6.2",
"vue-loader": "11.1.4",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-server": "^3.1.11",
"webpack-merge": "^4.1.1",
"webpack-stream": "^4.0.0"
"@types/fs-extra": "^11.0.4",
"@types/webextension-polyfill": "^0.10.7",
"@vitejs/plugin-vue": "^5.1.1",
"@vitejs/plugin-vue2": "^2.3.1",
"bestzip": "^2.2.1",
"cross-env": "^7.0.3",
"esno": "^4.7.0",
"fs-extra": "^11.2.0",
"npm-run-all": "^4.1.5",
"rimraf": "^6.0.1",
"sass": "^1.77.8",
"vite": "^5.3.5"
}
}
14 changes: 0 additions & 14 deletions packer.sh

This file was deleted.

Loading

0 comments on commit 11e6dfe

Please sign in to comment.