This commit is contained in:
Utopiah
2026-08-05 10:16:19 +02:00
parent 6d8e70ac48
commit 8bf36769bf
+3 -2
View File
@@ -3,6 +3,7 @@ console.log('extension loaded kbd');
let blocked = false
document.addEventListener("keypress", function(event) {
console.log('events ' + event);
console.log('pressed ' + event.key);
if (blocked) return
userActions.filter( a => event.key == a.key ).map( a => eval( a.action ) )
@@ -23,13 +24,13 @@ let userActions = [
// from https://gist.github.com/Utopiah/525718c8a60ee2d9e25d7724e9dbb355
const month = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ][new Date().getMonth()];
const year = new Date().getFullYear();
const url = `https://fabien.benetou.fr/PersonalInformationStream/WithoutNotes${month}${year}`;
const url = `https://change.to.your/PIM/Notes${month}${year}`;
function addWiki(){
fetch(url+'?action=source') .then( response => { return response.text() } ) .then( data => {
var writeURL = url + '?action=edit';
var selection = window.getSelection().toString();
var content = "post=1&author=PIM_Trydactil&authpw=edit_password&text="+data+'%0a* '
var content = "post=1&author=PIM_kdbext&authpw=change_this_edit_password&text="+data+'%0a* '
+ window.location.href.replace(/\?utm_source.*/,'');
if (selection) content += '%0a** ' + selection;
fetch(writeURL, { method: 'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: content })