soscripted / sox Goto Github PK
View Code? Open in Web Editor NEWStack Overflow Extras: a userscript for the Stack Exchange websites to add a bunch of optional toggle-able features
Home Page: http://stackapps.com/q/6091/
License: MIT License
Stack Overflow Extras: a userscript for the Stack Exchange websites to add a bunch of optional toggle-able features
Home Page: http://stackapps.com/q/6091/
License: MIT License
if (CHAT || window.CHAT) {
return 'chat';
} else {
if (StackExchange || window.StackExchange) {
if (StackExchange.options.site.isMetaSite) {
return 'meta';
}
}
}
is what we currently have on repo-system
But I always get CHAT
is not defined, and only using window.CHAT
doesn't always work.
Any ideas?
"triangluar" should be "triangular"
Installed Version: 1.0.2 | Environment: Chrome/Tampermonkey
Expected Behaviour
The tag is properly coloured & outlined:
This is can be achieved using:
a.post-tag {
border-color: rgba(0,0,0,.3);
background-color: rgb(195, 218, 250);
}
a.post-tag:before {
border-color: inherit;
background-color: inherit;
}
Actual Behaviour
Only the main block part of the tag is coloured and the border is dropped:
This is done by the following CSS:
element.style {
border-width: 0px;
background-color: rgb(195, 218, 250);
}
Error Logs: N/A
Steps to reproduce
Enable "Highlight only the favourite tags for favourite questions" and visit http://gaming.stackexchange.com/ while having some favourite tags.
Installed Version: 1.0.3 | Environment: Chrome/Tampermonkey
Expected Behaviour
While having a "native" panel open and hovering over a different "native" icon, that menu is opened automatically. I think for the menu to look properly integrated this behaviour should be retained in the script.
Actual Behaviour
Moving the mouse over the SOX icon in the header does nothing while keeping the last opened menu open.
Steps to reproduce
Installed Version: 1.0.3 | Environment: Chrome (49.0.2623.110)/Tampermonkey
Expected Behaviour
When reporting an issue, the 1.X.X
should change to the installed version number.
Actual Behaviour
The value is left unchanged.
Steps to reproduce
It should probably just add the image to the end of the comment rather than replace the link
I think it would be nice for the duplicate and closed labels to show the same text as in the dupe/close banner when hovered
marked as duplicate by Shadow Wizard 5 hours ago
closed as not constructive by Jon Ericson ♦ Mar 19 '13 at 17:11
etc, and for the duplicate label itself to be a link to the question of which this one is a duplicate. Or would loading each question that has a label and searching for that data be more work than it's worth?
Installed Version: 1.0.3 | Environment: Chrome/Tampermonkey
Expected Behavior
The tags should have an easily legible background & text color combination.
Actual Behavior
The tags are slightly hard to read due to lack of enough contrast. According to contrast-ratio the colors used are considered acceptable if they are above 18pt in size, however, tags have a font-size
of 12px
on SO.
Installed Version: 1.0.3 DEV | Environment: Chrome/Tampermonkey
Expected Behavior
Display linked content inline when clicking the expansion button
Actual Behavior
It doesn't work. 👎 location protocol defaults to http, this causes errors when viewing the site over https and the URL being requested does not exists. Perhaps switching to the API would be better.
Installed Version: 1.0.3DEV | Environment: Chrome/Tampermonkey
Go to http://stackoverflow.com/questions/5223/length-of-a-javascript-object-that-is-associative-array. Scroll down... then some more. Note how nearly every name has a SO icon beside it, marking nearly every user as employee.
Expected Behavior
Mark only employees as such.
Actual Behavior
Marking (nearly) every username on http://stackoverflow.com/questions/5223/length-of-a-javascript-object-that-is-associative-array as an employee, when most / all of them aren't.
Error Logs
None.
Steps to reproduce
Loaded http://stackoverflow.com/questions/5223/length-of-a-javascript-object-that-is-associative-array with the "Mark employees with SO icon" option. Doesn't seem to occur with (m)any? other pages.
Installed Version: 1.0.4 DEV | Environment: Windows 7/Firefox/GreaseMonkey
Expected Behavior
Alt-O opens pre-defined comment view/edit/delete dialog .
Actual Behavior
Dialog opens at a semi-sensible place for some page zooms, but:
(Also, would expect pressing Alt-O again to toggle off that dialog. )
Error Logs
Nothing of note.
Steps to reproduce
Alt-O in comment textbox. Zoom in and out to see effects.
When seeing an edit suggestion where the title has not been edited, the script still crosses everything out and adds a new copy in green, exactly the same.
It shouldn't.
eg: http://meta.stackexchange.com/review/suggested-edits/43289
Wthout having read the source, my guess is that the "Linked-arrow-direction-generator" function that serves to supply the icons in the "Linked" section uses a process of elimination: the function looks for links that are both in the "Linked" section and on this page, and considers "Linked" entries not on this page to be links-to-here.
If that is indeed the implementation, then this feature-request may or may not warrant a rewrite of that.
Question A links to question B. Question B links to question A. The Lemmings arrows in the "Linked" section for question A will likely show that question B is linked by here and similarly for question B, for the reasons noted in the previous paragraph.
This is, as I've just demonstrated, rather confusing. Could SOX use some form of black magic to detect this recursion and show both arrows in this case?
Installed Version: 1.0.2 | Environment: Chrome/Tampermonkey
Expected Behavior
When I open the settings dialog while I'm on a question's page, there should be a checkbox in front of the "Add a bunch of features to the standard markdown editor (autocorrect, find+replace, Ace editor, and more!)" option that I can un-check and then save my settings. From what I've seen, this only seems to happen on question pages.
Actual Behavior
There is no checkbox.
Error Logs
Uncaught ReferenceError: ace is not defined (anonymous function) @ ext-language_tools.js:1
Uncaught ReferenceError: ace is not defined (anonymous function) @ theme-github.js:1
Uncaught ReferenceError: ace is not defined (anonymous function) @ mode-javascript.js:1
Uncaught ReferenceError: ace is not defined (anonymous function) @ javascript.js:1
Steps to reproduce
Visit any question page with the aforementioned option enabled and witness the checkbox's ascension from its original place.
The navbar should be fixed to the top of the screen in the correct position and the ubuntu related links should be placed somewhere without blocking content.
The navbar is pushed to the right and not aligned correctly.
The sidebar collection of links that were cloned from the top are now blocking page content when viewing on small screens.
I would suggest moving the cloned ubuntu related links directly below the fixed top bar, like so:
I think it would be nice to have an branch for each unfinished feature, as it would make it possible for others to help implement/port a feature.
Installed Version: v1.0.3 | Environment: Chrome/Tampermonkey Version 49.0.2623.110 m
Expected Behavior
Link should work on all stack exchange sites, or guide the user to meta.stackexchange.com
to get their access token
Actual Behavior
Clicking a link while not on http://meta.stackexchange.com/ throws an error.
Error Logs
VM2649:3464 Uncaught channelUrl must be under the current domain
r@ VM2649:3464
(anonymous function) @ VM2649:3740
n.event.dispatch @ VM2649:8
r.handle @ VM2649:8
Steps to reproduce
Visit http://stackoverflow.com/
Open up the settings
Click on 'Get access token?'
#1 Misspelling in the Editing section:
#2 The Always show the 'Link from the web' box when uploading an image
option seems to be broken
#3 When changing a tag's favourite/ignored/neutral status using the icon in the tag info tool tip, the highlights are reset back to the defaults (same thing happens when going to a different page, which could be related to the new navigation)
#4 Clicking a tag name in a comment seems to do nothing despite the icon and link formatting
#5 The Parse titles to links cross-SE-sites
option can make posts illegible (probably should only activate when the link text is just the start of the URL itself)
As of right now it just keeps adding toolbars.
The Insert Code dialog is also having issues, it is being displayed, it just doesn't have any content.
Installed Version: 1.0.4DEV | Environment: Tampermonkey/Chrome
Feature request: arrow direction shouldn't be chosen by cryptographically secure RNG
Expected Behavior
"Linked" arrows shouldn't imply a link in a certain direction when there is none. This isn't a side effect of #40 as it only seems to happen when there's a link in exactly one direction.
Actual Behavior
I linked to the "Linked" quesition; the "Linked" question doesn't link here.
Error Logs
None.
Steps to reproduce
The example I have on hand is http://meta.stackexchange.com/q/278270, but it seems to happen with a lot of questions all over the SE network.
Unfortunately, it's not fully clear to me how to reproduce this specifically -- I've only noticed from browsing SE a lot and reading linked questions that it sometimes doesn't match up. (It's a heisenbug -- try to quantify it and it runs away.)
Installed Version: 1.0.3DEV | Environment: Tampermonkey/Chrome
Expected Behavior
Topbar position on Skeptics.SE should reflect that of all other sites, rather than hiding itself.
Actual Behavior
Only on Skeptics.SE, if the Fix topbar position
option is checked, then the top-bar will not display at all and you will need to uncheck the option from another page.
If the option is unchecked then it will display as usual, anchored annoyingly to the top of the page.
Error Logs
I don't think this is relevant, but I'll add it anyways.
Steps to reproduce
Loaded http://skeptics.stackexchange.com today. Not sure if this bug was introduced recently, since I never noticed it before...?
Installed Version: 1.0.3 | Environment: Firefox/Greasemonkey
Expected Behavior
When checking a second comment option, a semicolon is automatically added after comment from the first option. If you then uncheck the second option, the comment gets removed, and you would also expect the semicolon delimiter to be removed as well.
Actual Behavior
When unchecking the second option, the comment gets removed, but not the semicolon delimiter. If you keep checking and unchecking further options, the semicolons just pile up.
Steps to reproduce
Installed Version: 1.0.4DEV | Environment: Tampermonkey/Chrome
Tabular reviewer stats aren't very tabular.
Expected Behavior
Like this:
Actual Behavior
Like this:
Error Logs
yay, error logs, for once.
SOX error: There was an error loading the feature "Appearance-tabularReviewerStats". Please raise an issue on GitHub, and copy the following error log.
VM541:3856 TypeError: Cannot read property '0' of null(…)
content.js:9 content: detected DOMContentLoaded 208efcd9-1c08-4ee5-9407-88132c3f25c3
https://api.stackexchange.com/2.2/posts/undefined?order=desc&sort=activity&…dnSEBb8&key=)2kXF9IR5OHnfGRPDahCVg((&access_token=XXXXXXXX)) Failed to load resource: the server responded with a status of 400 (Bad Request)
https://api.stackexchange.com/2.2/posts/undefined?order=desc&sort=activity&…dnSEBb8&key=)2kXF9IR5OHnfGRPDahCVg((&access_token=XXXXXXXX)) Failed to load resource: the server responded with a status of 400 (Bad Request)
I'm not actually sure if I accurately XXX'd the XXX-worthy content in there (pls no hax).
Steps to reproduce
Loaded a page like http://stackoverflow.com/review/suggested-edits/11980890, and clicked "more".
SOX has now stopped working completely. I don't know whether it's because the changes you made to make it compatible with SOUP.
Clues:
I've tried all 3 versions of SOX.
Browser Firefox latest on Windows.
SOUP 1.54.4
Browser has been restarted.
Some feature requests... (strikethrough any that won't happen)
about:blank?p=chat.se
or something via $("#div").load("url")
getSiteName()
work on chat (somebody1234)Installed Version: 1.0.3DEV | Environment: Tampermonkey/Chrome
TL;DR the arrows in the Linked section of a question, borne of here, seem to all point "here" rather than reflect reality.
Expected Behavior
"Linked-from-here" arrows point NE, "away" from the question, while "Linked-to-here" arrows point SW, "towards" the question.
Actual Behavior
All the arrows for all "Linked" sections on all sites on the SE network point "towards" the question regardless of where the link is actually. The tooltips, however, are correct, it's just the arrow icons themselves that all point the same wrong direction... kinda like lemmings :D.
Error Logs
Nope. But you can have an example that should definitely point "away" from the question:
Steps to reproduce
Load a question that links or is linked to by another question on the same site.
If this doesn't get implemented by SO, I think we should go ahead and add it to SOX.
See my answer on that post.
// ==UserScript==
// @name Toggle Vote Count
// @version 1.0
// @author ᴉʞuǝ
// @namespace https://github.com/enki-code
// @match *://*.stackoverflow.com/questions/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
(function($) {
$(document).ajaxComplete(function(event, request, settings) {
if(settings.url.indexOf('vote-counts') > -1){
$('.vote-count-post div').one('click', function(){
var $vote = $(this).parent(),
upvotes = +$vote.find('div:first-child').text(),
downvotes = +$vote.find('div:nth-child(3)').text(),
score = Math.abs(upvotes) - Math.abs(downvotes);
var $score = $('<span/>', {
text: score,
class: 'vote-count-post',
title: 'View upvote and downvote totals',
style: 'cursor: pointer;',
itemprop: 'upvoteCount'
});
$vote.replaceWith($score);
StackExchange.vote.bindFetchVoteCounts();
});
}
});
}(jQuery));
The autofill feature being discussed in #43 makes the version number show up properly (yay!) but has the side effect of the text box into which I am currently typing being not editable, (boo!) meaning I have to go disable SOX before writing an issue.
Steps to repro: Update to 1.0.4DEV and try to make a new issue here at https://github.com/soscripted/sox/issues/new.
Installed Version: 1.0.4DEV | Environment: Chrome/Tampermonkey
The screenshot on the README's really out of date. I'd provide one right here to be a nice person, but at least one of the developers has Mac that takes pretty screenshots with shadowing and stuff.
Expected Behavior
The README should have a screenshot that shows the beautiful amazingness that is the current, searchable, lexicographically-sorted options box.
Actual Behavior
The screenshot on the README's like, 10 millenia old. Show off your cool project!
Installed Version: 1.0.4 DEV | Windows 7/GreaseMonkey/Firefox
Expected Behavior
Clicking reply-to-comment button should open comment dialog and start comment with "@username".
Actual Behavior
Clicking reply-to-comment has no detectable effect.
Error Logs
TypeError: $(...).parents(...).find(...).first(...).find(...).attr(...) is undefined sox.features.js:576:34
Steps to reproduce
Just clicking the thing.
Installed Version: 1.0.3 DEV | Environment: Chrome/Tampermonkey
Expected Behavior
When creating an issue on GitHub, SOX should inject the currently installed version number into the post.
Actual Behavior
The version number is being injected, but only after a page refresh. I suspect a timing issue.
Related Code
var SOX_VERSION = '1.0.3 DEV';
// auto-inject version number into new GitHub issues
if (location.hostname.indexOf('github.com') > -1 ) {
var $issue = $('#issue_body'),
issueText = $issue.text();
issueText = issueText.replace('1.X.X', SOX_VERSION);
$issue.text(issueText);
// on GitHub, stop execution of the rest of the script.
return;
}
Installed Version: 1.0.3 DEV | Environment: Chrome/Tampermonkey
Expected Behavior
The new meta question alert diamond to display only on main sites that have a child meta site.
Actual Behavior
Displays on all main sites and is throwing an error on Stackapps because it does not have a meta site.
Error Logs
TypeError: Cannot read property 'split' of undefined(…)
Installed Version: 1.0.4DEV | Environment: Tampermonkey/Chrome
This is the corollary to #48: I don't have any wildcards*
in my favourite tags, but it's still too greedy.
Expected Behavior
Only favourite-highlight and star tags that I've actually favourited.
Actual Behavior
Like this:
[exception-handling]
isn't in my favourite tags, but a lot of questions with that tag also have [python-3.x]
Or this:
[racket-faq]
isn't in my favourite tags (and no longer exists), but [racket]
is.
Error Logs
None.
Steps to reproduce
It's... not really clear what I did to reproduce this exactly; I just screenshotted the ocassions I noted. It doesn't happen all the time, and it's far from an urgent problem, but I thought I'd introduce it anyways.
A 'HOT' sign appears on a hot question
It doesn't
Go to any hot question (via http://stackexchange.com/)
It's due to the Google Feeds API shutting down. We need to use something else
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.