Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Commit

Permalink
v1.6 merge
Browse files Browse the repository at this point in the history
#16 #5 #10 fixed.

Thanks #14
  • Loading branch information
shu8 committed Sep 8, 2015
2 parents c7bd05d + 1bbeff2 commit 073fda1
Show file tree
Hide file tree
Showing 11 changed files with 290 additions and 41 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stack Exchange Additional Optional Features
<sup>acronym coming soon, I hope :)</sup>

A userscript for the StackExchange websites to add a bunch of optional, user-selectable features via an easy-to-use control panel.
A userscript for the Stack Exchange websites to add a bunch of optional, user-selectable features via an easy-to-use control panel.

#How to use, requirements, how it works
1. Install [Tampermonkey](http://tampermonkey.net/) (for Chrome), or [Greasemonkey](http://www.greasespot.net/) (for Firefox) or similar. These are userscript managers that are required for this script to work, because they also provide support for `GM_*` functions, which this script relies on to save the options you set!
Expand All @@ -19,7 +19,7 @@ In case you're wondering, it works by using `GM_setValue` to save your options a
In the latest version: (these link to their corresponding feature-request (from any site on the network), *if applicable*):

- [Make the topbar fixed (stay at the top as you scroll)](http://meta.stackexchange.com/questions/101385/should-the-top-navigation-be-frozen-optional) (v0.1)
- [Unfade low score answers](http://meta.stackexchange.com/questions/129593/un-fade-low-score-answers-on-rollover-or-click) (v0.1)
- <s>[Unfade low score answers](http://meta.stackexchange.com/questions/129593/un-fade-low-score-answers-on-rollover-or-click) (v0.1)</s> (deprecated; implemented by Stack Exchange by default now)
- [Move `show more comments` link to top](http://meta.stackexchange.com/questions/55020/add-a-show-more-comments-button-to-the-top-of-a-list-of-comments) (v0.1)
- [Ellipsis after long names](http://meta.stackexchange.com/questions/244729/provide-an-ellipsis-after-a-long-name-instead-of-truncating-it) (v0.1)
- [Rename chat tabs](http://meta.stackexchange.com/questions/246289/change-the-browser-tab-title-on-chat-pages-to-chat-sitename-or-chat-room-name) (v0.1)
Expand Down Expand Up @@ -76,13 +76,29 @@ In the latest version: (these link to their corresponding feature-request (from
- Compatibility with new (currently MSE-only) profiles
- 06/03/15 - v0.7: Added more features (mentioned above)
- 22/03/15 - v0.8: Added more features (mentioned above)
- 26/03/15 - v0.9: Added more features (mentioned above), updated `kbdAndBullets` function to make icons fit better
- 26/03/15 - v0.9:
- Added more features (mentioned above),
- updated `kbdAndBullets` function to make icons fit better
- 29/03/15 - v1.0: Added more features (mentioned above)
- 30/03/15 - v1.1: Added more features (mentioned above)
- 30/04/15 - v1.2 *(and 1.2.1)*: Added more features (mentioned above), updated `employeeStar` function for animuson(!) *(and edited `answerTagsSearch` function)*
- 30/04/15 - v1.2 *(and 1.2.1)*:
- Added more features (mentioned above),
- updated `employeeStar` function for animuson(!) *(and edited `answerTagsSearch` function)*
- 04/05/15 - v1.3: Added more features (mentioned above)
- 26/05/15 - v1.4: Added more features (mentioned above), updated dialog styles to match SE style, fixed some stuff that disappeared in a previous version that I forgot to add back (so some of the change log might be wrong :()
- 13/07/15 - v1.5: Added more features (mentioned above), fixed bug in `fixedTopbar` where topbar went over header originally (thanks [ArtOfCode](http://worldbuilding.stackexchange.com/users/2685/artofcode) for clever CSS 'hack' :), made script [compatible with stackoverflow-code-expando](http://stackapps.com/a/6427/26088), added auto-selection for [Change the share link to show link as markdown format](http://stackapps.com/a/6451/26088)
- 26/05/15 - v1.4:
- Added more features (mentioned above),
- updated dialog styles to match SE style,
- fixed some stuff that disappeared in a previous version that I forgot to add back (so some of the change log might be wrong :()
- 13/07/15 - v1.5:
- Added more features (mentioned above),
- fixed bug in `fixedTopbar` where topbar went over header originally (thanks [ArtOfCode](http://worldbuilding.stackexchange.com/users/2685/artofcode) for clever CSS 'hack' :),
- added auto-selection for [Change the share link to show link as markdown format](http://stackapps.com/a/6451/26088)
- 08/09/15 - v1.6:
- Removed no longer neccessary feature (implemented by SE now),
- fixed bug where the mod diamond and help menu would merge together,
- used my own [SE Helper functions](https://github.com/shu8/SE_OptionalFeatures/blob/develop/helperFunctions.js) to avoid repetitive code in getting common info like site names, reputation, usernames, etc...,
- removed fade effect on the `metaChatBlogStackExchangeButton` feature,
- [reimplemented the sticky vote buttons](https://github.com/shu8/SE_OptionalFeatures/pull/14), to fix a few bugs!

---

Expand All @@ -92,8 +108,8 @@ Descriptions of features
- Make the topbar fixed:
Make the topbar stay at the top of the screen as you scroll down

- Unfade low score answers:
When you rollover posts with a score of -3 or less, ungray them out so you can read them properly
- <s> Unfade low score answers:
When you rollover posts with a score of -3 or less, ungray them out so you can read them properly</s> **This feature is now implemented by default by Stack Exchange, no longer needed in this script!**

- Move `show more comments` link to top:
The `show x more comments` link is by default shown at the bottom of the comments section. But that can be annoying if you're trying to read through a 'conversation' - this will clone the link and put it before the actual comments as well
Expand Down
4 changes: 2 additions & 2 deletions Stand-alone-scripts/metaChatBlogLinksOnHover.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ $('#your-communities-section > ul > li > a').hover(function () {
blogLink = '//' + $(this).attr('href').split('/')[2].split('.')[0] + '.blogoverflow.com';
}

$(this).find('.rep-score').hide(500);
$(this).find('.rep-score').hide();
$(this).append('<div class="related-links" style="float: right;">\
<a href="'+link+'">meta</a>\
<a href="http://chat.stackexchange.com">chat</a>\
<a href="'+blogLink+'">blog</a>\
</div>');
}
}, function () {
$(this).find('.rep-score').show(500);
$(this).find('.rep-score').show();
$(this).find('.related-links').remove();
});
2 changes: 1 addition & 1 deletion Stand-alone-scripts/metaNewQuestionAlert.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var metaName = 'meta.' + $(location).attr('hostname').split('.')[0],
var apiLink = "https://api.stackexchange.com/2.2/questions?pagesize=5&order=desc&sort=activity&site=" + metaName;

$('.topbar-links').prepend('<span id="mod-extra-icon" class="reputation links-container" style="font-size: 2em; vertical-align: top; padding-top: 3px; color: white;">♦</span>');
$('.js-topbar-dialog-corral').prepend('<div class="topbar-dialog help-dialog js-help-dialog dno" id="newMetaQuestionsDialog" style="top: 34px; left: 380px; display: none;">\
$('.js-topbar-dialog-corral').prepend('<div class="topbar-dialog help-dialog js-help-dialog dno" id="newMetaQuestionsDialog" style="top: 34px; left: 380px; display: none; overflow: auto;">\
<div class="modal-content" id="newMetaQuestionsList"><span id="closeNewQuestionList" style="float:right">x</span>\
<ul>\
<li>\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,22 @@
// ==/UserScript==

$(document).ready(function() {
$('.vote').sticky($('.vote').parent().parent().parent().parent().parent());
$(window).scroll(function(){
$(".votecell").each(function(){
var offset = 0;
if($(".topbar").css("position") == "fixed"){
offset = 34;
}
var vote = $(this).find(".vote");
if($(this).offset().top - $(window).scrollTop() + offset <= 0){
if($(this).offset().top + $(this).height() + offset - $(window).scrollTop() - vote.height() > 0){
vote.css({position:"fixed", left:$(this).offset().left, top:0 + offset});
}else{
vote.css({position:"relative", left:0, top:$(this).height()-vote.height()});
}
}else{
vote.css({position:"relative", left:0, top:0});
}
});
});
});
50 changes: 50 additions & 0 deletions extraCSS.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,53 @@
text-align: center;
overflow: auto;
}

/*fixedTopbar (by @UnicornsAreVeryVeryYummy - http://stackapps.com/users/33746/unicorns-are-very-very-yummy):*/
.links {
position: fixed;
z-index: 10001;
width: 100px;
height: 310px;
line-height: 19.2px;
display: block;
-moz-box-shadow: 0 0 4px #ccc;
-webkit-box-shadow: 0 0 4px #ccc;
box-shadow: 0 0 4px #ccc;
font-family: Ubuntu, Arial, "libra sans", sans-serif;
font-weight: 300;
top: 50%;
margin-top: -155px;
}

.linksList {
-moz-box-sizing: border-box;
background: none repeat scroll 0 0 #fff;
margin: 0 auto;
width: 100px;
height: 310px;
position: fixed;
z-index: 10001;
top: 50%;
margin-top: -155px;
}

li.activeSite {
border-right: 3px solid #dd4814;
}

ul.siteLink {
list-style: none;
list-style-type: none;
}

li.siteLink {
display: block;
}

.stickyToolbar {
position: fixed;
top: 0px;
left: 50%;
margin-left: -515px;
z-index: 1000;
}
Loading

0 comments on commit 073fda1

Please sign in to comment.