forked from Tylian/XKit
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Great Tweaks Update of July 2020 #1866
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d33160c
Add tweak to hide notification badges
hobinjk 7791640
Bonus tweak: hide post highlight (user-requested)
hobinjk 4f3364d
Address review comments
hobinjk b29c053
Update "Pin Avatars" tweak for React
invalidCards ec76936
Hide Notification -> Badge style dropdown
invalidCards f5dbd34
Add tweak to hide just the activity badge
invalidCards 19bea78
Add grayscale option for the new post button
invalidCards 16269d2
Applying nightpool's feedback
invalidCards File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//* TITLE Tweaks **// | ||
//* VERSION 5.7.5 **/ | ||
//* VERSION 6.0.1 **/ | ||
//* DESCRIPTION Various little tweaks for your dashboard. **// | ||
//* DEVELOPER new-xkit **// | ||
//* DETAILS These are small little tweaks that allows you customize your dashboard. If you have used XKit 6, you will notice that some of the extensions have been moved here as options you can toggle. Keep in mind that some of the tweaks (the ones marked with a '*') can slow down your computer. **// | ||
|
@@ -296,7 +296,19 @@ XKit.extensions.tweaks = new Object({ | |
default: false, | ||
value: false, | ||
desktop_only: true | ||
} | ||
}, | ||
"hide_notification_badges": { | ||
text: "Hide all notification badges in the header", | ||
default: false, | ||
value: false, | ||
desktop_only: true | ||
}, | ||
hide_post_highlight: { | ||
text: "Hide the post highlight that appears when using jk to scroll", | ||
default: false, | ||
value: false, | ||
desktop_only: true | ||
}, | ||
}, | ||
|
||
default_page_title: "", | ||
|
@@ -305,8 +317,11 @@ XKit.extensions.tweaks = new Object({ | |
XKit.extensions.tweaks.process_wrap_tags_one_line(); | ||
}), | ||
|
||
run: function() { | ||
run: async function() { | ||
this.running = true; | ||
|
||
await XKit.css_map.getCssMap(); | ||
|
||
this.css_to_add = ""; | ||
|
||
if (!XKit.interface.is_tumblr_page()) { return; } | ||
|
@@ -726,8 +741,20 @@ XKit.extensions.tweaks = new Object({ | |
} | ||
} | ||
|
||
XKit.tools.add_css(XKit.extensions.tweaks.css_to_add, "xkit_tweaks"); | ||
if (XKit.extensions.tweaks.preferences.hide_notification_badges.value) { | ||
let notificationBadgeSel = XKit.css_map.keyToCss('notificationBadge'); | ||
XKit.extensions.tweaks.add_css(`${notificationBadgeSel} { | ||
display: none !important; | ||
}`, 'xkit_tweaks_hide_notification_badges'); | ||
} | ||
|
||
if (XKit.extensions.tweaks.preferences.hide_post_highlight.value) { | ||
const ltoSel = XKit.css_map.keyToCss('listTimelineObjectInner'); | ||
XKit.extensions.tweaks.add_css(`${ltoSel} { | ||
box-shadow: none !important; | ||
}`, 'xkit_tweaks_hide_notification_badges'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be |
||
} | ||
XKit.tools.add_css(XKit.extensions.tweaks.css_to_add, "xkit_tweaks"); | ||
}, | ||
|
||
show_all_tags_button_event: function() { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no quotes?