Last active
April 5, 2022 20:07
-
-
Save ShlomoCode/61faf431e21311ed32d7101734568689 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name אישור לפני נתינת דיסלייק | |
// @version 0.2 | |
// @author @ShlomoCode | |
// @match https://mitmachim.top/* | |
// ==/UserScript== | |
$(window).on('action:post.toggleVote', (e, d) => { | |
if (d.delta === -1 && d.unvote === false) { | |
if (!confirm('האם אתה בטוח שברצונך לתת דיסלייק?')) { | |
$(`[data-pid="${d.pid}"]`).find('[component="post/downvote"]').click(); | |
app.alert({ | |
type: 'warning', | |
title: 'שים לב!', | |
message: "המערכת ניסתה לבטל את הדיסלייק. יש לוודא שהוא באמת בוטל", | |
timeout: 2500 | |
}) | |
} else { | |
app.alert({ | |
type: 'success', | |
title: 'הדיסלייק ניתן בהצלחה', | |
timeout: 2500 | |
}); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment