Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name facebook.com | Activity Log Time Travel
- // @match https://www.facebook.com/*
- // ==/UserScript==
- function set(key, diff) {
- const url = new URL(window.location.href);
- const value = parseInt(url.searchParams.get(key));
- url.searchParams.set(key, value + diff);
- window.location.href = url.toString();
- }
- function inc_year(diff) {
- set('year', diff);
- }
- function inc_month(diff) {
- set('month', diff);
- }
- Object.assign(unsafeWindow, {inc_year, inc_month});
- // bookmarklets
- // y+ javascript:inc_year(1);void(0);
- // y- javascript:inc_year(-1);void(0);
- // m+ javascript:inc_month(1);void(0);
- // m- javascript:inc_month(-1);void(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement