├── .gitignore ├── LICENSE ├── README.md ├── changelog.html ├── css ├── chrome_shared.css ├── content_style.css ├── floating_sidebar.css ├── options_style.css └── widgets.css ├── img ├── arrow_down.png ├── icons │ ├── iconOriginal.acorn │ ├── iconOriginal.png │ ├── icon_128x128.png │ ├── icon_16x16.png │ └── icon_48x48.png └── worrying_emoji.png ├── js ├── background.js ├── externals │ └── bypass_min_rep_view_vote_counts_script.js ├── features │ ├── better_answer.js │ ├── bypass_min_rep_view_vote_counts.js │ ├── expand_votes_counts.js │ ├── floating_sidebar.js │ ├── hiding_content.js │ ├── misc_features.js │ ├── navigate_through_answers.js │ ├── no_answer.js │ └── screen_features.js ├── helper.js ├── main.js └── options_page.js ├── manifest.json └── options_page.html /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StackOverflow Power User 2 | 3 | StackOverflow Power User is a free and open-source Google Chrome extension for every developer that spend time on StackOverflow website. It helps finding the best answer rapidly, and improve the way you navigate through the website. 4 | 5 | Here are the main features : 6 | - Show answers sidebar (with vote counts) & inform you if you have previously upvoted an answer 7 | - Show indicator when there's a better answer than the accepted one 8 | - Show indicator when there isn't any answer to the question 9 | - Auto-scroll to first answer 10 | - Navigate through answers with keyboard arrow keys (left/right) 11 | - Auto expand votes count & Show answer score (in percent) 12 | - Bring scrolling behavior to vote buttons, so that you still see them even on long posts 13 | - Expand all comments automatically when performing CMD/Ctrl + F 14 | - Hide the new StackOverflow left sidebar that takes so much space for useless links 15 | - Hide elements from StackOverflow right sidebar to prevent distraction 16 | 17 | 18 | ### Download on Chrome Web Store 19 | 20 | StackOverflow Power User is available via the [official Chrome Web Store](https://chrome.google.com/webstore/detail/stackoverflow-power-user/dghoicnlchonhhkccfmjpjconhpajhdg). 21 | 22 | 23 | ### Install from source 24 | 25 | 1. Clone the repository locally on your computer. 26 | 2. On Chrome, navigate to chrome://extensions/ and enable "Developer mode" in the upper right corner. 27 | 3. Click on the Load unpacked extension... button. 28 | 4. Select the directory in which you have cloned the repository and confirm. 29 | 30 | It should open the Settings page, indicating successful installation. You can now make changes to the code, and click the `Refresh` arrow on chrome://extensions/ to load your changes. 31 | 32 | 33 | ### Contributing 34 | 35 | Contributions are very welcome. Feel free to submit pull requests for new features and bug fixes. You can also create an issue if you want me to add a feature or fix a bug. 36 | 37 | 38 | ### Author 39 | 40 | This extension has been written by Anthonin Cocagne. 41 | - [Mail](mailto:anthococagne@hotmail.fr) 42 | - [LinkedIn](https://www.linkedin.com/in/anthonin-cocagne-22aa6ab5/) 43 | - [StackOverflow](https://stackoverflow.com/users/4894980/anthopak?tab=profile) -------------------------------------------------------------------------------- /changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StackOverflow Power User Updated 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 15 | StackOverflow Power User 16 |
17 | 🔥 The extension has been updated! 18 | 19 |
20 | 21 |

22 |

23 | If you find it useful, please consider adding a review on Chrome Store 24 |
26 | 27 |
28 | 29 |

30 | You can also send a small donation to support continuous updates! 31 |
32 | 33 |
34 |
35 |

36 |
37 | 38 |

Changelog - What's new?

39 |
40 |
    41 | 42 | 43 |
  • 0.4.2
  • 44 | - Add a feature to make SO page wider to take full advantage of large screens. It can be enabled and adjusted from options page. Thanks to AndyPLsql.
    45 | - Sidebar: number of answers in the sidebar is now configurable
    46 | - Fix "Hide Hot Meta posts" feature for the new DOM update 47 |
    48 |

    49 |
  • 0.4.1
  • 50 | - Add a feature to allow expanding vote counts even when you don't have the required 1000 reputation points. It's enabled by default. Thanks to Rob W (who wrote the original script) and thedemons (who added the feature in this extension) for making this possible.
    51 | - Fix "Show indicator when there isn't any answer to the question" feature, accidentally broke in previous update 52 |

    53 |
  • 0.4.0
  • 54 | - Update extension to use the new Manifest v3, made mandatory by Google, to prevent the extension from breaking in a few months
    55 | - Sidebar: remove number of favorites information from the popover, since this information isn't available anymore 56 |

    57 |
  • 0.3.5
  • 58 | - Update answer percent score styling, to match more with SO theme (as requested here)
    59 | - Sidebar: fix information popover not showing up anymore with SO website changes
    60 | - Remove "Hide the useless StackOverflow left sidebar" feature since it can now be done natively from SO user preferences (see here) 61 |

    62 |
  • 0.3.4
  • 63 | - Fix sidebar answer count which was broken due to StackExchange DOM update
    64 | - Increase min duration between two auto expand votes, because it seems SO has increased it to ~2sec 65 |

    66 |
  • 0.3.3
  • 67 | - Fix broken extension due to favorites now being bookmarks
    68 | - Change a bit sidebar color to fit better with the new SO dark mode 69 |

    70 |
  • 0.3.2
  • 71 | - Fix extension which was (again) broken due to StackExchange DOM update
    72 | - Change URL matching wildcard to allow running on subdomains like ru.stackoverflow.com 73 |

    74 |
  • 0.3.1
  • 75 | - Fix extension which was broken due to StackExchange DOM update 76 |

    77 |
  • 0.3.0 (This update is pretty huge!)
  • 78 | - The code has been totally refactored, improved, documented in preparation to open sourcing. You can now 79 | contribute on the extension by making PR on GitHub. 80 | You can also submit bugs reports or feature requests there ;)
    81 | - Add a feature to automatically expand all comments (hidden behind "show X more comments") when you use 82 | CMD/Ctrl + F to search in page. This way you ensure that you are searching the whole page and are not 83 | missing any results.
    84 | - Add a feature to hide "Hot Network Questions" & "Meta Posts" blocks from SO right sidebar to prevent 85 | distraction (as requested by @Mikey Stengel)
    86 | - Settings page : sort features by categories to improve readability + settings are now saved automatically 87 | when you change an option (no need to click the Save button anymore)
    88 | - Improve the "Auto expand votes count" feature to avoid reaching SO limit while navigating through answers 89 | with arrow keys 90 |

    91 |
  • 0.2.2
  • 92 | - Add a feature to bring scrolling behavior to vote buttons, so that you still see them even on long posts. This 93 | feature is enabled by default and can be disabled in settings (but I'm pretty sure you will love it!).
    94 | - Answers Sidebar : add the question vote number in the popup implemented in 0.2.0
    95 | - Fix the "upvote question from Answer Sidebar" feature implemented in 0.2.1 that was broken (sorry about that) 96 |

    97 |
  • 0.2.1
  • 98 | - Answers Sidebar : add the ability to upvote question right from the answers sidebar, so that you don't have to 99 | scroll to the top to do it (as suggested by @Géza Kiss)
    100 | - Answers Sidebar : add an indicator to know if question is upvoted (as suggested by @Géza Kiss)
    101 | - Create a separate Changelog page that will appear every time the extension is updated 102 |

    103 |
  • 0.2.0
  • 104 | - Fix extension for StackOverflow website update
    105 | - Answers Sidebar : add the ability to hover the number of answers cell to get additional information about the 106 | current page
    107 | - Small bug fixes in Answer Sidebar 108 |

    109 |
  • 0.1.4
  • 110 | - Add new Stack Exchange websites support 111 |

    112 |
  • 0.1.3
  • 113 | - Automatically disable Auto expand votes count & Show answer score if you doesn't have enough 114 | reputation (the setting is not disabled in this settings page, to prevent you from being unable to use it when 115 | you'll have enough rep) 116 |

    117 |
  • 0.1.2
  • 118 | - Add option to disable the new left sidebar that appears on every page (it will only disable it on 119 | questions/answers pages, and not in profile etc) 120 |

    121 |
  • 0.1.1
  • 122 | - Improve settings page 123 |

    124 |
  • 0.1.0
  • 125 | - Initial release 126 |
127 | 128 | 129 |
130 |
131 |
132 | 133 |
134 |
135 | 136 | 137 |


138 | 142 |
143 | 144 | -------------------------------------------------------------------------------- /css/chrome_shared.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | /* CSS has been written by The Chromium Authors but modified and 6 | * enhanced by Ram Swaroop. */ 7 | 8 | /* This file holds CSS that should be shared, in theory, by all user-visible 9 | * chrome:// pages. */ 10 | 11 | @import url("widgets.css"); 12 | 13 | 14 | /* Prevent CSS from overriding the hidden property. */ 15 | [hidden] { 16 | display: none !important; 17 | } 18 | 19 | html.loading * { 20 | -webkit-transition-delay: 0 !important; 21 | -webkit-transition-duration: 0 !important; 22 | } 23 | 24 | body { 25 | cursor: default; 26 | margin: 0; 27 | font-family:'Segoe UI', Tahoma, sans-serif; 28 | font-size: 75%; 29 | color:rgb(48, 57, 66) 30 | } 31 | 32 | p { 33 | line-height: 1.8em; 34 | } 35 | 36 | h1, 37 | h2, 38 | h3 { 39 | -webkit-user-select: none; 40 | font-weight: normal; 41 | /* Makes the vertical size of the text the same for all fonts. */ 42 | line-height: 1; 43 | } 44 | 45 | h1 { 46 | font-size: 1.5em; 47 | } 48 | 49 | h2 { 50 | font-size: 1.3em; 51 | margin-bottom: 0.4em; 52 | } 53 | 54 | h3 { 55 | font-size: 1.2em; 56 | margin-bottom: 0.8em; 57 | } 58 | 59 | a { 60 | color: rgb(17, 85, 204); 61 | text-decoration: underline; 62 | } 63 | 64 | a:active { 65 | color: rgb(5, 37, 119); 66 | } 67 | 68 | /* Elements that need to be LTR even in an RTL context, but should align 69 | * right. (Namely, URLs, search engine names, etc.) 70 | */ 71 | html[dir='rtl'] .weakrtl { 72 | direction: ltr; 73 | text-align: right; 74 | } 75 | 76 | /* Input fields in search engine table need to be weak-rtl. Since those input 77 | * fields are generated for all cr.ListItem elements (and we only want weakrtl 78 | * on some), the class needs to be on the enclosing div. 79 | */ 80 | html[dir='rtl'] div.weakrtl input { 81 | direction: ltr; 82 | text-align: right; 83 | } 84 | 85 | html[dir='rtl'] .favicon-cell.weakrtl { 86 | -webkit-padding-end: 22px; 87 | -webkit-padding-start: 0; 88 | } 89 | 90 | /* weakrtl for selection drop downs needs to account for the fact that 91 | * Webkit does not honor the text-align attribute for the select element. 92 | * (See Webkit bug #40216) 93 | */ 94 | html[dir='rtl'] select.weakrtl { 95 | direction: rtl; 96 | } 97 | 98 | html[dir='rtl'] select.weakrtl option { 99 | direction: ltr; 100 | } 101 | 102 | /* WebKit does not honor alignment for text specified via placeholder attribute. 103 | * This CSS is a workaround. Please remove once WebKit bug is fixed. 104 | * https://bugs.webkit.org/show_bug.cgi?id=63367 105 | */ 106 | html[dir='rtl'] input.weakrtl::-webkit-input-placeholder, 107 | html[dir='rtl'] .weakrtl input::-webkit-input-placeholder { 108 | direction: rtl; 109 | } 110 | 111 | /* Horizontal line */ 112 | hr{ 113 | border:0; 114 | height:0; 115 | border-top:1px solid rgba(0, 0, 0, 0.1); 116 | border-bottom:1px solid rgba(255, 255, 255, 0.1) 117 | } 118 | /* Different sizes */ 119 | .small{ 120 | font-size:11px 121 | } 122 | .large{ 123 | font-size:18px 124 | } 125 | .x-large{ 126 | font-size:24px 127 | } 128 | .xx-large{ 129 | font-size:30px 130 | } 131 | 132 | 133 | label { 134 | font-weight: bold; 135 | } 136 | 137 | 138 | 139 | header span { 140 | font-size: 40%; 141 | } -------------------------------------------------------------------------------- /css/content_style.css: -------------------------------------------------------------------------------- 1 | .votesPercent { 2 | text-align:center; 3 | margin-top:8px; 4 | 5 | font-family: Arial; 6 | font-size: 19px; 7 | } 8 | 9 | .votesPercent .percentSymbol { 10 | font-size: 90%; 11 | } 12 | -------------------------------------------------------------------------------- /css/floating_sidebar.css: -------------------------------------------------------------------------------- 1 | .social { 2 | /*width: 200px; reAddForDetails*/ 3 | width: 70px; 4 | position: fixed; 5 | top: 50%; 6 | transform: translate(0%, -50%); /* center vertically regardless of height (https://stackoverflow.com/a/2006008/4894980)*/ 7 | perspective: 1000px; 8 | opacity: 0.97; 9 | 10 | /* Override SO css sheets */ 11 | list-style-type: none !important; 12 | margin-left: 0 !important; 13 | box-sizing: content-box !important; 14 | z-index: 1000; 15 | } 16 | 17 | .social li a { 18 | display: inline-block; 19 | height: 20px; 20 | width: 40px; 21 | background: rgb(100,100,100); 22 | border-bottom: 1px solid #555; 23 | font: normal normal normal 24 | 16px/20px 25 | 'Source Sans Pro', Helvetica, Arial, sans-serif; 26 | color: #fff; 27 | -webkit-font-smoothing: antialiased; 28 | padding: 10px; 29 | text-decoration: none; 30 | text-align: center; 31 | transition: background .5s ease .300ms 32 | } 33 | 34 | .social li a.upvotedAnswer { 35 | background: #FF8040; 36 | } 37 | 38 | #nbAnswers.upvotedAnswer { 39 | color: #FF8040 !important; 40 | transition: color .5s ease .300ms 41 | } 42 | 43 | #upvoteQuestionButton { 44 | margin-top: 10px; 45 | margin-bottom: 5px; 46 | padding-top: 5px; 47 | padding-bottom: 5px; 48 | } 49 | 50 | .social li a:hover { background: #3b5998 } 51 | /*.social li:nth-child(2) a:hover { background: #00acee }*/ 52 | /*.social li:nth-child(3) a:hover { background: #ea4c89 }*/ 53 | /*.social li:nth-child(4) a:hover { background: #dd4b39 }*/ 54 | 55 | .social li:first-child a { border-radius: 0 5px 0 0 } 56 | .social li:last-child a { border-radius: 0 0 5px 0 } 57 | 58 | .social li a span { 59 | font-weight: normal; 60 | font-size: 13px; 61 | width: 200px; 62 | float: left; 63 | text-align: left; 64 | background: rgb(60,60,60); 65 | color: #fff; 66 | margin: -50px 74px; 67 | padding: 8px; 68 | transform-origin: 0; 69 | visibility: hidden; 70 | opacity: 0; 71 | transform: rotateY(45deg); 72 | border-radius: 5px; 73 | transition: all .5s ease .1s 74 | } 75 | 76 | .social li span:after { 77 | content: ''; 78 | display: block; 79 | width: 0; 80 | height: 0; 81 | position: absolute; 82 | left: -20px; 83 | top: 23px; 84 | border-left: 10px solid transparent; 85 | border-right: 10px solid rgb(50,50,50); 86 | border-bottom: 10px solid transparent; 87 | border-top: 10px solid transparent; 88 | } 89 | 90 | .social li a:hover span { 91 | visibility: visible; 92 | opacity: 1; 93 | transform: rotateY(0) 94 | } 95 | 96 | 97 | 98 | #nbAnswers { 99 | background: rgb(60,60,60); 100 | font-weight: bold; 101 | /*cursor: default;*/ 102 | height:40px; 103 | } 104 | 105 | 106 | /*region Arrows*/ 107 | 108 | /*NOTE : CSS for arrows is a bit tricky. I couldn't find a cleaner way to do it. 109 | It has the known bug that if you zoom in the SO page (using ctrl/cmd + +) they will be misplaced*/ 110 | 111 | .arrow { 112 | width:4px !important; 113 | display:inline !important; 114 | /*font: normal normal normal 15px/14px 'FontAwesome', 'Source Sans Pro', Helvetica, Arial, sans-serif !important;*/ 115 | font-size:15.8px !important; 116 | padding: 7px !important; 117 | } 118 | 119 | .arrow:first-child { 120 | border-radius: 0 0px 0 0 !important; 121 | border-right: 0.5px solid #555; 122 | } 123 | 124 | .arrow:last-child { 125 | margin-left: -4px !important; 126 | } 127 | 128 | .arrow:last-child div { 129 | display: inline-block; 130 | -webkit-transform: matrix(-1, 0, 0, 1, 0, 0); 131 | } 132 | 133 | /*endregion*/ 134 | 135 | .noselect { 136 | -webkit-touch-callout: none; /* iOS Safari */ 137 | -webkit-user-select: none; /* Safari */ 138 | -khtml-user-select: none; /* Konqueror HTML */ 139 | -moz-user-select: none; /* Firefox */ 140 | -ms-user-select: none; /* Internet Explorer/Edge */ 141 | user-select: none; /* Non-prefixed version, currently 142 | supported by Chrome and Opera */ 143 | } -------------------------------------------------------------------------------- /css/options_style.css: -------------------------------------------------------------------------------- 1 | body>.main-container { 2 | max-width: 630px; 3 | margin: 50px auto 4 | } 5 | 6 | header { 7 | max-width: 700px; 8 | margin: 0 auto 20px auto; 9 | font-size: 48px; 10 | text-align: center 11 | } 12 | 13 | header em { 14 | font-size: 15px 15 | } 16 | 17 | footer { 18 | max-width: 700px; 19 | margin: 40px auto 20px auto; 20 | text-align: center 21 | } 22 | 23 | h1 { 24 | margin-top: 40px !important; 25 | } 26 | 27 | h2 { 28 | margin-top: 40px !important; 29 | margin-bottom: 15px !important; 30 | } 31 | 32 | .newFeature { 33 | color: red; 34 | } 35 | 36 | #saveConfirmationBottomBar { 37 | display: none; 38 | position: sticky; 39 | left: 0; 40 | width: 100%; 41 | background: #00A388; 42 | bottom: 0; 43 | color: #fff; 44 | height: 60px; 45 | line-height: 60px; 46 | z-index: 10; 47 | 48 | text-align: center; 49 | font-size: 16px; 50 | } -------------------------------------------------------------------------------- /css/widgets.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | /* CSS has been written by The Chromium Authors but modified and 6 | * enhanced by Ram Swaroop. */ 7 | 8 | /* This file defines styles for form controls. The order of rule blocks is 9 | * important as there are some rules with equal specificity that rely on order 10 | * as a tiebreaker. These are marked with OVERRIDE. */ 11 | 12 | /* Default state **************************************************************/ 13 | 14 | :-webkit-any(button, 15 | input[type='button'], 16 | input[type='submit']):not(.custom-appearance):not(.link-button), 17 | select, 18 | input[type='checkbox'], 19 | input[type='radio'] { 20 | -webkit-appearance: none; 21 | -webkit-user-select: none; 22 | background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede); 23 | border: 1px solid rgba(0, 0, 0, 0.25); 24 | border-radius: 2px; 25 | box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 26 | inset 0 1px 2px rgba(255, 255, 255, 0.75); 27 | color: #444; 28 | font: inherit; 29 | margin: 0 1px 0 0; 30 | text-shadow: 0 1px 0 rgb(240, 240, 240); 31 | } 32 | 33 | :-webkit-any(button, 34 | input[type='button'], 35 | input[type='submit']):not(.custom-appearance):not(.link-button), 36 | select { 37 | min-height: 2em; 38 | min-width: 4em; 39 | /* The following platform-specific rule is necessary to get adjacent 40 | * buttons, text inputs, and so forth to align on their borders while also 41 | * aligning on the text's baselines. */ 42 | padding-bottom: 1px; 43 | } 44 | 45 | :-webkit-any(button, 46 | input[type='button'], 47 | input[type='submit']):not(.custom-appearance):not(.link-button) { 48 | -webkit-padding-end: 10px; 49 | -webkit-padding-start: 10px; 50 | } 51 | 52 | select { 53 | -webkit-appearance: none; 54 | -webkit-padding-end: 20px; 55 | -webkit-padding-start: 6px; 56 | /* OVERRIDE */ 57 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'), 58 | -webkit-linear-gradient(#ededed, #ededed 38%, #dedede); 59 | background-position: right center; 60 | background-repeat: no-repeat; 61 | } 62 | 63 | html[dir='rtl'] select { 64 | background-position: center left; 65 | } 66 | 67 | input[type='checkbox'] { 68 | bottom: 2px; 69 | height: 13px; 70 | position: relative; 71 | vertical-align: middle; 72 | width: 13px; 73 | } 74 | 75 | input[type='radio'] { 76 | /* OVERRIDE */ 77 | border-radius: 100%; 78 | bottom: 3px; 79 | height: 15px; 80 | position: relative; 81 | vertical-align: middle; 82 | width: 15px; 83 | } 84 | 85 | /* TODO(estade): add more types here? */ 86 | input[type='number'], 87 | input[type='password'], 88 | input[type='search'], 89 | input[type='text'], 90 | input[type='url'], 91 | input:not([type]), 92 | textarea { 93 | border: 1px solid #bfbfbf; 94 | border-radius: 2px; 95 | box-sizing: border-box; 96 | color: #444; 97 | font: inherit; 98 | margin: 0; 99 | /* Use min-height to accommodate addditional padding for touch as needed. */ 100 | min-height: 2em; 101 | padding: 3px; 102 | /* For better alignment between adjacent buttons and inputs. */ 103 | padding-bottom: 4px; 104 | } 105 | 106 | input[type='search'] { 107 | -webkit-appearance: textfield; 108 | /* NOTE: Keep a relatively high min-width for this so we don't obscure the end 109 | * of the default text in relatively spacious languages (i.e. German). */ 110 | min-width: 160px; 111 | } 112 | 113 | /* Remove when https://bugs.webkit.org/show_bug.cgi?id=51499 is fixed. 114 | * TODO(dbeam): are there more types that would benefit from this? */ 115 | input[type='search']::-webkit-textfield-decoration-container { 116 | direction: inherit; 117 | } 118 | 119 | /* Checked ********************************************************************/ 120 | 121 | input[type='checkbox']:checked::before { 122 | -webkit-user-select: none; 123 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAcklEQVQY02NgwA/YoJgoEA/Es4DYgJBCJSBeD8SboRinBiYg7kZS2IosyQ/Eakh8LySFq4FYHFlxGRBvBOJYqMRqJMU+yApNkSRAeC0Sux3dfSCTetE0wKyXxOWhMKhTYIr9CAUXyJMzgLgBagBBgDPGAI2LGdNt0T1AAAAAAElFTkSuQmCC'); 124 | background-size: 100% 100%; 125 | content: ''; 126 | display: block; 127 | height: 100%; 128 | width: 100%; 129 | } 130 | 131 | input[type='radio']:checked::before { 132 | background-color: #666; 133 | border-radius: 100%; 134 | bottom: 3px; 135 | content: ''; 136 | display: block; 137 | left: 3px; 138 | position: absolute; 139 | right: 3px; 140 | top: 3px; 141 | } 142 | 143 | /* Hover **********************************************************************/ 144 | 145 | :enabled:hover:-webkit-any( 146 | select, 147 | input[type='checkbox'], 148 | input[type='radio'], 149 | :-webkit-any( 150 | button, 151 | input[type='button'], 152 | input[type='submit']):not(.custom-appearance):not(.link-button)) { 153 | background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0); 154 | border-color: rgba(0, 0, 0, 0.3); 155 | box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), 156 | inset 0 1px 2px rgba(255, 255, 255, 0.95); 157 | color: black; 158 | } 159 | 160 | :enabled:hover:-webkit-any(select) { 161 | /* OVERRIDE */ 162 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'), 163 | -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0); 164 | } 165 | 166 | /* Active *********************************************************************/ 167 | 168 | :enabled:active:-webkit-any( 169 | select, 170 | input[type='checkbox'], 171 | input[type='radio'], 172 | :-webkit-any( 173 | button, 174 | input[type='button'], 175 | input[type='submit']):not(.custom-appearance):not(.link-button)) { 176 | background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7); 177 | box-shadow: none; 178 | text-shadow: none; 179 | } 180 | 181 | :enabled:active:-webkit-any(select) { 182 | /* OVERRIDE */ 183 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAaUlEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEImJmZvwE1/UfHIHGQPNGGAbHCggULFrKxsf1ENgjEB4mD5EnxJoaByAZB5Yk3DNlAPj6+L8gGkWUYzMC3b982IRtEtmFQjaxYxDAwAGi4TwMYKNLfAAAAAElFTkSuQmCC'), 184 | -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7); 185 | } 186 | 187 | /* Disabled *******************************************************************/ 188 | 189 | :disabled:-webkit-any( 190 | button, 191 | input[type='button'], 192 | input[type='submit']):not(.custom-appearance):not(.link-button), 193 | select:disabled { 194 | background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6); 195 | border-color: rgba(80, 80, 80, 0.2); 196 | box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08), 197 | inset 0 1px 2px rgba(255, 255, 255, 0.75); 198 | color: #aaa; 199 | } 200 | 201 | select:disabled { 202 | /* OVERRIDE */ 203 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAWklEQVQoz2P4//8/A7UwdkEGhiggTsODo4g2LBEIGhoa/uPCIHmiDQNihQULFizEZhBIHCRPijexGggzCCpPvGHoBiIbRJZhMAPfvn3bhGwQ2YZBNbJiEcPAAIgGZrTRc1ZLAAAAAElFTkSuQmCC'), 204 | -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6); 205 | } 206 | 207 | input:disabled:-webkit-any([type='checkbox'], 208 | [type='radio']) { 209 | opacity: .75; 210 | } 211 | 212 | input:disabled:-webkit-any([type='password'], 213 | [type='search'], 214 | [type='text'], 215 | [type='url'], 216 | :not([type])) { 217 | color: #999; 218 | } 219 | 220 | /* Focus **********************************************************************/ 221 | 222 | :enabled:focus:-webkit-any( 223 | select, 224 | input[type='checkbox'], 225 | input[type='number'], 226 | input[type='password'], 227 | input[type='radio'], 228 | input[type='search'], 229 | input[type='text'], 230 | input[type='url'], 231 | input:not([type]), 232 | :-webkit-any( 233 | button, 234 | input[type='button'], 235 | input[type='submit']):not(.custom-appearance):not(.link-button)) { 236 | /* OVERRIDE */ 237 | -webkit-transition: border-color 200ms; 238 | /* We use border color because it follows the border radius (unlike outline). 239 | * This is particularly noticeable on mac. */ 240 | border-color: rgb(77, 144, 254); 241 | outline: none; 242 | } 243 | 244 | /* Link buttons ***************************************************************/ 245 | 246 | .link-button { 247 | -webkit-box-shadow: none; 248 | background: transparent none; 249 | border: none; 250 | color: rgb(17, 85, 204); 251 | cursor: pointer; 252 | /* Input elements have -webkit-small-control which can override the body font. 253 | * Resolve this by using 'inherit'. */ 254 | font: inherit; 255 | margin: 0; 256 | padding: 0 4px; 257 | } 258 | 259 | .link-button:hover { 260 | text-decoration: underline; 261 | } 262 | 263 | .link-button:active { 264 | color: rgb(5, 37, 119); 265 | text-decoration: underline; 266 | } 267 | 268 | .link-button[disabled] { 269 | color: #999; 270 | cursor: default; 271 | text-decoration: none; 272 | } 273 | 274 | /* Checkbox/radio helpers ****************************************************** 275 | * 276 | * .checkbox and .radio classes wrap labels. Checkboxes and radios should use 277 | * these classes with the markup structure: 278 | * 279 | *
280 | * 284 | *
285 | */ 286 | 287 | :-webkit-any(.checkbox, .radio) label { 288 | /* Don't expand horizontally: . */ 289 | display: -webkit-inline-box; 290 | padding-bottom: 7px; 291 | padding-top: 7px; 292 | } 293 | 294 | :-webkit-any(.checkbox, .radio) label input ~ span { 295 | -webkit-margin-start: 0.6em; 296 | /* Make sure long spans wrap at the same horizontal position they start. */ 297 | display: block; 298 | } 299 | 300 | :-webkit-any(.checkbox, .radio) label:hover { 301 | color: black; 302 | } 303 | 304 | label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span { 305 | color: #999; 306 | } -------------------------------------------------------------------------------- /img/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/arrow_down.png -------------------------------------------------------------------------------- /img/icons/iconOriginal.acorn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/icons/iconOriginal.acorn -------------------------------------------------------------------------------- /img/icons/iconOriginal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/icons/iconOriginal.png -------------------------------------------------------------------------------- /img/icons/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/icons/icon_128x128.png -------------------------------------------------------------------------------- /img/icons/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/icons/icon_16x16.png -------------------------------------------------------------------------------- /img/icons/icon_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/icons/icon_48x48.png -------------------------------------------------------------------------------- /img/worrying_emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnthoPakPak/StackOverflowPowerUser/bd563564a7de4bdfec80a86f60beeeab6df036f0/img/worrying_emoji.png -------------------------------------------------------------------------------- /js/background.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Open `options_page.html` on extension install 3 | * Open `changelog.html` on extension update 4 | */ 5 | chrome.runtime.onInstalled.addListener(function (details){ 6 | if (details.reason === "install") { 7 | chrome.tabs.create({url:chrome.runtime.getURL("options_page.html")},function(){}) 8 | } else if (details.reason === "update") { 9 | chrome.tabs.create({url:chrome.runtime.getURL("changelog.html")},function(){}) 10 | } 11 | }); -------------------------------------------------------------------------------- /js/externals/bypass_min_rep_view_vote_counts_script.js: -------------------------------------------------------------------------------- 1 | // @name Stack Exchange: "View Vote totals" without 1000 rep 2 | // @description Enables the total vote counts feature without requiring an account or 1k+ reputation. 3 | // @author Rob Wu 4 | // @license Creative Commons 3.0 SA 5 | 6 | // @website http://stackapps.com/q/3082/9699 7 | 8 | // Chrome extension: https://chrome.google.com/webstore/detail/oibfliilcglieepgkdkahpfiiigdijdd 9 | // Greasemonkey script: https://greasyfork.org/en/scripts/6192-stack-exchange-view-vote-totals-without-1000-rep 10 | 11 | 12 | // @history 06-feb-2012 Release 13 | // @history 07-feb-2012 Added CSS fix for IE7-. Added reference to optimized bookmarklet. 14 | // @history 07-feb-2012 Modified click handler, so that it's also working after voting. 15 | // @history 13-jun-2012 Upgraded to the SE 2.0 API (from 1.1) 16 | // @history 10-nov-2012 Released Chrome extension 17 | // @history 16-nov-2012 Added support for /review/ (previously limited to /questions/ only) 18 | // @history 16-nov-2012 Added support for older jQuery versions (1.4.4 at Area 51) 19 | // @history 16-nov-2012 Added support for /review/ (Suggested edits) 20 | // @history 19-nov-2012 Corrected one-letter typo 21 | // @history 12-dec-2012 Corrected $.fn.click override: .call replaced with .apply 22 | // @history 23-may-2013 Added support for /questions/tagged/... and /search 23 | // @history 05-sep-2013 Added Math Overflow to list of sites 24 | // @history 21-feb-2014 Use https SE API on https SE sites. 25 | // @history 18-jun-2014 Replace http with * to match https as well. 26 | // @history 31-oct-2014 Use *.stackoverflow.com to match pt.stackoverflow.com and others. 27 | // @history 25-sep-2016 Fix match pattern for meta.askubuntu.com. 28 | // @history 23-dec-2018 Support updated StackExchange layout. 29 | // @history 05-jul-2020 Disable script when user already has 1k+ rep in the updated layout. 30 | // @history 05-jul-2020 Support Stack Overflow's dark theme. 31 | 32 | /* 33 | * How does this script work? 34 | * - The Vote count feature is detected through the existence of the 35 | * tooltip (title) on the Vote Count buttons. 36 | * When the title is present, the script does not have any side-effects. 37 | * When the title is absent, this script adds the feature: 38 | * 1) A style is appended to the head, which turns the cursor in a pointer on the 39 | * Vote Count elements. 40 | * 2) One global event listener is bound to the document. 41 | * This click listener captures clicks on the Vote Count elements (now + future) 42 | * 3) On click, the vote counts are requested through the Stack Exchange API. 43 | * The response is parsed, and the vote totals are shown. 44 | * A tooltip is also added, in accordance with the normal behaviour. 45 | * As a result, the Vote count button is not affected by the script any more. 46 | * 47 | * Usually, when a user casts a vote, the buttons are reset, and a click handler 48 | * is added. This click handler is attached in a closure, and cannot be modified. 49 | * To prevent this method from being triggered, jQuery.fn.click() is modified. 50 | */ 51 | 52 | /* This script injection method is used to have one single script that works in all modern browsers. 53 | * Against sandboxed window-objects (Chrome) 54 | * The code itself has successfully been tested in: 55 | * Firefox 3.0 - 78.0 56 | * Opera 9.00 - 12.00 57 | * Chrome 1 - 83 58 | * IE 7 - 10 (for IE6, see http://web.archive.org/web/20131104100735/http://userscripts.org/scripts/show/125051) 59 | * Safari 3.2.3 - 5.1.7 */ 60 | 61 | /* 62 | * Modified by: thedemons 63 | * 64 | * As an extension of StackOverflowPowerUser 65 | * 66 | * GitHub: https://github.com/AnthoPakPak/StackOverflowPowerUser 67 | */ 68 | 69 | (function () { 70 | var api_url = location.protocol + '//api.stackexchange.com/2.0/posts/'; 71 | var api_filter_and_site = '?filter=!)q3b*aB43Xc&key=DwnkTjZvdT0qLs*o8rNDWw((&site=' + location.host; 72 | var canViewVotes = 1; /* Intercepts click handler when the user doesn't have 1k rep.*/ 73 | var b = StackExchange.helpers; 74 | var original_click = $.fn.click; 75 | $.fn.click = function () { 76 | if (this.hasClass('js-vote-count') && !canViewVotes) return this; 77 | return original_click.apply(this, arguments); 78 | }; 79 | var voteCountClickHandler = function (e) { 80 | var $this = $(this), t = this.title, $tmp; 81 | if (!t) { 82 | // ... 83 | var tooltipElemId = $this.attr('aria-describedby'); 84 | if (tooltipElemId) { 85 | t = $(document.getElementById(tooltipElemId)).text(); 86 | } 87 | } 88 | if (/up \/ |upvotes/.test(t) || /View/.test(t) && canViewVotes) return; 89 | canViewVotes = 0; /* At this point, not a 1k+ user */ 90 | var postId = $this.siblings('input[type="hidden"]').val(); 91 | if (!postId) { 92 | // At /review/, for instance: 93 | // Also at /questions/ as of 2020. 94 | $tmp = $this.closest('[data-post-id]'); 95 | postId = $tmp.attr('data-post-id'); 96 | } 97 | if (!postId) { 98 | // At /review/ of Suggested edits 99 | $tmp = $this.closest('.suggested-edit'); 100 | postId = $.trim($tmp.find('.post-id').text()); 101 | } 102 | if (!postId) { 103 | // At /questions/tagged/.... 104 | // At /search 105 | $tmp = $this.closest('.question-summary'); 106 | postId = /\d+/.exec($tmp.attr('id')); 107 | postId = postId && postId[0]; 108 | } 109 | if (!postId) { 110 | console.error('Post ID not found! Please report this at http://stackapps.com/q/3082/9699'); 111 | return; 112 | } 113 | b.addSpinner($this); 114 | $.ajax({ 115 | type: 'GET', 116 | url: api_url + postId + api_filter_and_site + '&callback=?', /* JSONP for cross-site requests */ 117 | dataType: 'json', 118 | success: function (json) { 119 | json = json.items[0]; 120 | var up = json.up_vote_count, down = json.down_vote_count; 121 | up = up ? '+' + up : 0; /* If up > 0, prefix a plus sign*/ 122 | down = down ? '-' + down : 0; /* If down > 0, prefix a minus sign */ 123 | $this.parent().find('.message-error').fadeOut('fast', function () { 124 | $(this).remove(); 125 | }); 126 | $this.css('cursor', 'default').attr('title', up + ' up / ' + down + ' down') 127 | .html('
' + up + '
' + 128 | '
' + 129 | '
' + down + '
'); 130 | }, 131 | error: function (N) { 132 | b.removeSpinner(); 133 | b.showErrorPopup($this.parent(), N.responseText && N.responseText.length < 100 ? 134 | N.responseText : 'An error occurred during vote count fetch'); 135 | } 136 | }); 137 | e.stopImmediatePropagation(); 138 | }; 139 | $(document).on('click', '.js-vote-count', voteCountClickHandler); 140 | })(); -------------------------------------------------------------------------------- /js/features/better_answer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check if there are answers, and if so, check if there is a better answer than the accepted one. 3 | * 4 | * Fun fact : this feature is the one that lead me to create this extension, that has now far more features ! Initially, the extension was named StackOverflow Better Answer :D 5 | */ 6 | function showBetterAnswerImageOnAcceptedAnswerIfNeeded() { 7 | if (questionHasAlmostOneAnswer()) { 8 | if (questionHasAcceptedAnswer()) { 9 | checkForBetterAnswer(); 10 | } 11 | } 12 | } 13 | 14 | 15 | /** 16 | * Check if the answer below the accepted answer has more votes than the accepted one. 17 | * If so, it will add an arrow-down image to indicate that the answer below can be better than the accepted one. 18 | */ 19 | function checkForBetterAnswer() { 20 | if (getNbAnswers() >= 2) { //if there's at least 2 answers 21 | let nbVotesAcceptedAnswer = getNbVotesForAnswerAtIndex(acceptedAnswerId); 22 | let nbVotesNextAnswer = getNbVotesForAnswerAtIndex(nextAnswerId); 23 | 24 | if (nbVotesNextAnswer > nbVotesAcceptedAnswer) { 25 | //console.log("There's a better answer !"); 26 | showArrowDownImageOnAcceptedAnswer(); 27 | } else { 28 | //console.log("No better answer…"); 29 | } 30 | } 31 | } 32 | 33 | 34 | /** 35 | * Add the arrow-down image next to the accepted answer to indicate that the answer below can be better than this one. 36 | * Clicking the arrow will scroll to the potentially-better answer. 37 | */ 38 | function showArrowDownImageOnAcceptedAnswer() { 39 | let acceptedAnswerVoteDiv = document.getElementsByClassName("js-voting-container")[acceptedAnswerId]; 40 | 41 | let goDownLink = document.createElement("A"); 42 | goDownLink.addEventListener("click", scrollToBetterAnswer); 43 | 44 | let goDownImg = document.createElement("IMG"); 45 | goDownImg.src = chrome.runtime.getURL('/img/arrow_down.png'); 46 | goDownImg.width = 40; 47 | goDownLink.appendChild(goDownImg); 48 | 49 | acceptedAnswerVoteDiv.appendChild(goDownLink); 50 | } -------------------------------------------------------------------------------- /js/features/bypass_min_rep_view_vote_counts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Allow users to expand vote counts without having more than 1000 reputation points. 3 | * 4 | * Integrated by @thedemons (https://github.com/AnthoPakPak/StackOverflowPowerUser/pull/6), based on a script written by Rob Wu, published under the Creative Commons 3.0 SA license. Website: http://stackapps.com/q/3082/9699. 5 | */ 6 | function setupBypassMinRepToViewVoteCounts() { 7 | var script = document.createElement('script'); 8 | script.src = chrome.runtime.getURL("js/externals/bypass_min_rep_view_vote_counts_script.js"); 9 | script.onload = function () { 10 | this.remove(); 11 | }; 12 | 13 | document.head.appendChild(script); 14 | script.parentNode.removeChild(script); 15 | } -------------------------------------------------------------------------------- /js/features/expand_votes_counts.js: -------------------------------------------------------------------------------- 1 | const nbVotesCountsToAutoExpand = 4; //the number of votes counts that will be automatically expanded on page load. Do not set a high value here to not overload SO servers. 2 | const timeBetweenTwoExpands = 2000; //the delay we need to wait between each expand to avoid reaching SO limit 3 | 4 | let expandVotesCountsTimer; 5 | let lastExpandedVotesCountDateTime = 0; 6 | 7 | 8 | function autoExpandVotesCounts() { 9 | if (!userHasEnoughReputation()) { //don't run this if user has less than 1000 rep 10 | //console.log("user hasn't got enough rep or isn't logged in"); 11 | return; 12 | } 13 | 14 | //wait 1sec after page load, then start auto expanding 15 | setTimeout(function () { 16 | addListenerOnVoteCounts(); 17 | 18 | expandVotesCountOnIndex(0, true); 19 | }, 1000); 20 | } 21 | 22 | 23 | /** 24 | * Verify that user has more than 1000 reputation points 25 | */ 26 | function userHasEnoughReputation() { 27 | if (userPrefs.bypassMinRepToViewVoteCountsEnabled) { 28 | return true; 29 | } 30 | 31 | if (userIsLoggedIn()) { //user is logged in 32 | let reputationString = getReputationString(); //will have this kind of format : 342 | 1,872 | 13k 33 | //console.log("rep string " + reputationString); 34 | if (reputationString.indexOf(",") !== -1 || reputationString.indexOf("k") !== -1) { 35 | return true; 36 | } 37 | } 38 | 39 | return false; 40 | } 41 | 42 | 43 | /** 44 | * Add a listener on each votes counts so that it observe the end of the ajax call that is made to fetch the votes details. 45 | * Every time a votes details is fetch (basically after clicking a vote number or with auto-expand votes counts feature), the following will be done : 46 | * - Show the percentage badge of the answer 47 | * - Expand the next votes count if current expanded answer is below `nbVotesCountsToAutoExpand` 48 | * - Change color of downvote text as I find it a bit dark 49 | */ 50 | function addListenerOnVoteCounts() { 51 | let votesCountArray = document.getElementsByClassName("js-vote-count"); 52 | 53 | for (let i = 0; i < votesCountArray.length; i++) { 54 | //wait until finish before launching the next fetch 55 | MutationObserver = window.MutationObserver || window.WebKitMutationObserver; 56 | let observer = new MutationObserver(function(mutations, observer) { 57 | //here, the votes details are available 58 | if (!votesCountArray[i].getElementsByTagName("DIV")[2]) //to avoid undefined 59 | return; 60 | 61 | votesCountArray[i].getElementsByTagName("DIV")[2].style.color = "#CC0000"; //change downvotes count text color for a brighter red (I find the stock one a bit dark) 62 | 63 | setPercentageForIndex(i); 64 | 65 | if (i+1 < nbVotesCountsToAutoExpand) 66 | expandVotesCountOnIndex(i + 1, true); 67 | 68 | //observer.disconnect(); 69 | }); 70 | 71 | observer.observe(votesCountArray[i], { 72 | attributes: true 73 | }); 74 | } 75 | } 76 | 77 | 78 | /** 79 | * Expand votes count on an answer. This is normally done clicking the vote number on SO (you will need more than 1000 reputation to have the privilege to do this). 80 | * There must be 1 second before each expand to avoid reaching SO limit. That's why listeners are set on votes counts (see `addListenerOnVoteCounts`) so that it will wait the end of the fetch before fetching the next one. 81 | * @param index index of the votes count to expand 82 | * @param withDelay should it be expanded waiting 1sec or immediately? 83 | */ 84 | function expandVotesCountOnIndex(index, withDelay) { 85 | let delay = withDelay ? timeBetweenTwoExpands : 0; 86 | 87 | if (!withDelay) { //even if we want no delay, ensure that last request has been made more than 1second ago 88 | cancelCurrentVotesCountsExpandationIfNeeded(); 89 | let timeSinceLastExpandedVotesCount = new Date().getTime() - lastExpandedVotesCountDateTime; 90 | delay = timeSinceLastExpandedVotesCount > (timeBetweenTwoExpands+200) ? 0 : (timeBetweenTwoExpands+200) - timeSinceLastExpandedVotesCount; //add 0.2s to be sure to avoid limit 91 | } 92 | 93 | expandVotesCountsTimer = setTimeout(function () { 94 | let votesCountArray = document.getElementsByClassName("js-vote-count"); 95 | 96 | if (index < votesCountArray.length) { 97 | votesCountArray[index].click(); 98 | 99 | lastExpandedVotesCountDateTime = new Date().getTime(); 100 | } 101 | }, delay); 102 | } 103 | 104 | 105 | /** 106 | * Once the votes count detail is fetch, this method is called to add the percentage badge on the answer. 107 | * It will inform on the validity of an answer by giving the % of positive votes. 108 | * If an answer has too much downvotes, the badge color will be red. 109 | * @param index index of the vote count 110 | */ 111 | function setPercentageForIndex(index) { 112 | let votesCountArray = document.getElementsByClassName("js-vote-count"); 113 | let voteDiv = document.getElementsByClassName("js-voting-container")[index]; 114 | 115 | let upVotes = parseInt(votesCountArray[index].getElementsByTagName("DIV")[0].innerHTML); 116 | let downVotes = Math.abs(parseInt(votesCountArray[index].getElementsByTagName("DIV")[2].innerHTML)); //turn it to positive number (remove -) 117 | 118 | let totalVotes = upVotes + downVotes; 119 | 120 | let percentPositive = 0; 121 | if (totalVotes > 0) percentPositive = Math.round(upVotes/totalVotes * 100); 122 | 123 | //console.log(upVotes, downVotes, percentPositive); 124 | 125 | if (voteDiv.getElementsByClassName("votesPercent").length > 0) { //if the badge is already created we update it 126 | if (upVotes === 0 && downVotes === 0) { //if there are currently no votes (this is different from having +1/-1) 127 | return; //we don't show unknown percent values 128 | } else { 129 | voteDiv.getElementsByClassName("votesPercent")[0].innerHTML = percentPositive + "%"; 130 | voteDiv.getElementsByClassName("votesPercent")[0].style.color = getColorAccordingToPercent(percentPositive); 131 | } 132 | } else { //instead we create the badge 133 | let percentDiv = document.createElement("DIV"); 134 | percentDiv.className = "votesPercent"; 135 | 136 | if (upVotes === 0 && downVotes === 0) { //if there are currently no votes (this is different from having +1/-1) 137 | return; //we don't show unknown percent values 138 | } else { 139 | percentDiv.innerHTML = percentPositive + "%"; 140 | percentDiv.style.color = getColorAccordingToPercent(percentPositive); 141 | } 142 | 143 | voteDiv.appendChild(percentDiv); 144 | } 145 | } 146 | 147 | 148 | /** 149 | * Return a color going from green to red from a percentage value. 150 | * 100% is green, 80% is red. 151 | * I've arbitrary chosen 80% to be red as I think an answer having 20% of downvotes is a bad one. 152 | * @param percentValue 153 | * @returns {string} 154 | */ 155 | function getColorAccordingToPercent(percentValue){ 156 | if (percentValue < 80) //we don't want to be below 80 as 80 is already red 157 | percentValue = 80; 158 | 159 | //New method color between SO green/red colors 160 | let adaptedPercentValue = percentValue / 100; 161 | adaptedPercentValue = 1 - ((1 - adaptedPercentValue) * 5); //We want to convert a value between 0.8 and 1, to a value between 0 and 1. 1 / (1 - 0.8) = 5 162 | return getColorOnGradient(adaptedPercentValue); 163 | 164 | //value from 100 to 80 165 | //Old method between plain green/red (Inspired by this Fiddle: http://jsfiddle.net/jongobar/sNKWK/) 166 | // let hue=((0.2-(1-(percentValue/100)))*500).toString(10); 167 | // return ["hsl(",hue,",100%,50%)"].join(""); 168 | } 169 | 170 | /** 171 | * Get a color on a gradient between two colors, for a specific value 172 | * 173 | * Inspired by this answer: https://stackoverflow.com/a/30144587/4894980 174 | * @param {float} value value between 0 and 1 on the gradient 175 | * @returns color for this value 176 | */ 177 | function getColorOnGradient(value) { 178 | let greenColor = getCSSColorOfClass('.fc-green-600'); 179 | let redColor = getCSSColorOfClass('.fc-red-600'); 180 | 181 | var w1 = value; 182 | var w2 = 1 - w1; 183 | var rgb = [Math.round(greenColor[0] * w1 + redColor[0] * w2), 184 | Math.round(greenColor[1] * w1 + redColor[1] * w2), 185 | Math.round(greenColor[2] * w1 + redColor[2] * w2)]; 186 | return 'rgb('+rgb.join()+')'; 187 | } 188 | 189 | /** 190 | * Returns the color property of a CSS class. 191 | * We use this to fetch up/down votes colors, since they're different on light/dark SO, and other SE websites 192 | * @param className the name of the class we want to fetch color 193 | * @returns {string[]} [r, g, b] 194 | */ 195 | function getCSSColorOfClass(className) { 196 | var elem, style; 197 | elem = document.querySelector(className); 198 | style = getComputedStyle(elem); 199 | return style.color.replace(/[^\d,]/g, '').split(','); 200 | } 201 | 202 | /** 203 | * It will cancel currently queued votes counts expand. Useful when navigating through answers with arrow keys quickly. 204 | * Without it we often reach the SO limit of one fetch every 1sec. 205 | */ 206 | function cancelCurrentVotesCountsExpandationIfNeeded() { 207 | clearTimeout(expandVotesCountsTimer); 208 | } -------------------------------------------------------------------------------- /js/features/floating_sidebar.js: -------------------------------------------------------------------------------- 1 | var nbAnswersInSidebar = 5; //the number of answers to show in floating sidebar 2 | 3 | 4 | /** 5 | * Setup the votes counts sidebar. 6 | */ 7 | function setupSidebarWithVotesCounts(nbAnswers) { 8 | nbAnswersInSidebar = nbAnswers; 9 | showSidebarWithVotesCounts(); 10 | checkIfIHaveAlreadyUpvotedAnAnswer(); 11 | addListenerOnUpvoteButtons(); 12 | } 13 | 14 | 15 | //region Sidebar vote counts 16 | 17 | /** 18 | * Generates a floating sidebar with votes counts. Clicking on cells will scroll to the answer. 19 | * This html generation is not so great, it could be improved... It uses CSS rules from `floating_sidebar.css`. 20 | * 21 | * Original sidebar taken from : https://codepen.io/anon/pen/KodazE 22 | */ 23 | function showSidebarWithVotesCounts() { 24 | let votesCountArray = document.getElementsByClassName("js-vote-count"); 25 | 26 | let ul = document.createElement("UL"); 27 | ul.className = "social noselect"; 28 | 29 | addNbAnswersInSidebar(ul, votesCountArray.length - 1); 30 | 31 | for (let i = 1; i < votesCountArray.length;i++) { //start to 1 to avoid question 32 | let li = document.createElement("LI"); 33 | let a = document.createElement("A"); 34 | //let span = document.createElement("SPAN"); // re-add if we want details (reAddForDetails) 35 | //a.href = "#"; 36 | li.addEventListener("click", function() { 37 | let targetElement = event.target || event.srcElement; 38 | console.log(targetElement); 39 | scrollToAnswerAtIndex(i, true); 40 | }); 41 | 42 | let nbVotesAnswerI = (document.getElementsByClassName("js-vote-count")[i]).innerHTML; 43 | a.innerHTML = nbVotesAnswerI; 44 | 45 | //span.innerHTML = "100%"; // re-add if we want details (search reAddForDetails in CSS file) 46 | //a.appendChild(span); 47 | 48 | li.appendChild(a); 49 | ul.appendChild(li); 50 | 51 | if (i === nbAnswersInSidebar) //nb cells in sidebar 52 | break; 53 | } 54 | 55 | addLeftRightArrowsToUl(ul); 56 | 57 | document.body.appendChild(ul); 58 | } 59 | 60 | 61 | /** 62 | * Add the nbAnswers cell into sidebar, by adding an li to the passed ul. It uses CSS rules from `floating_sidebar.css`. 63 | * This html generation is not so great, it could be improved... 64 | * @param ul the list in which the li will be added 65 | * @param nbAnswers nbAnswers to showcase in this li 66 | */ 67 | function addNbAnswersInSidebar(ul, nbAnswers) { 68 | let li = document.createElement("LI"); 69 | let a = document.createElement("A"); 70 | 71 | a.id = "nbAnswers"; 72 | a.innerHTML = nbAnswers + "
answers
"; 73 | 74 | 75 | //add additional informations in popover 76 | let nbUpvotesOnQuestion = parseInt(document.getElementsByClassName("js-vote-count")[0].innerText); 77 | 78 | //dates and views information 79 | if (document.getElementsByClassName("d-flex fw-wrap pb8 mb16 bb").length !== 0) { 80 | let qInfoMainDiv = document.getElementsByClassName("d-flex fw-wrap pb8 mb16 bb")[0]; 81 | let qInfoDivsArray = qInfoMainDiv.getElementsByClassName("flex--item ws-nowrap mb8"); 82 | 83 | let lastActiveIsPresent = qInfoDivsArray.length > 2; 84 | 85 | let nbViews = qInfoDivsArray[lastActiveIsPresent ? 2 : 1].innerText.replace('Viewed ', '').replace(' times', ''); 86 | let asked = qInfoDivsArray[0].innerText.replace('Asked ', ''); 87 | 88 | let lastActive = lastActiveIsPresent ? qInfoDivsArray[1].innerText.replace('Active ', '') : "N/A"; 89 | 90 | a.innerHTML += "\n" + 91 | "● Question votes : " + nbUpvotesOnQuestion + "
\n" + 92 | "● Views : " + nbViews + "
\n" + 93 | "● Asked : " + asked + "
\n" + 94 | "● Active : " + lastActive + "\n" + 95 | "
" + 96 | "
"; 97 | } 98 | //end popover 99 | 100 | 101 | li.addEventListener("click", function() { 102 | let targetElement = event.target || event.srcElement; 103 | 104 | if (targetElement.id === 'upvoteQuestionButton') { 105 | upvoteQuestion(); 106 | } else { 107 | scrollToAnswerAtIndex(0, true); 108 | } 109 | }); 110 | 111 | li.appendChild(a); 112 | ul.appendChild(li); 113 | } 114 | 115 | 116 | /** 117 | * Add the <- and -> arrows on sidebar bottom. It uses CSS rules from `floating_sidebar.css`. 118 | * This html generation is not so great, it could be improved... 119 | * @param ul the list in which the arrows will be added 120 | */ 121 | function addLeftRightArrowsToUl(ul) { 122 | let divForArrows = document.createElement("DIV"); 123 | divForArrows.innerHTML = "
  • \n" + 124 | " ⬅︎\n" + 125 | "
    \n" + 126 | "
  • "; 127 | 128 | ul.appendChild(divForArrows); 129 | 130 | let leftArrow = ul.getElementsByClassName("arrow")[0]; 131 | leftArrow.addEventListener("click", function() { 132 | scrollToPreviousAnswer(true); 133 | }); 134 | 135 | let rightArrow = ul.getElementsByClassName("arrow")[1]; 136 | rightArrow.addEventListener("click", function() { 137 | scrollToNextAnswer(true); 138 | }); 139 | } 140 | 141 | //endregion 142 | 143 | 144 | 145 | //region Answer already upvoted 146 | 147 | /** 148 | * Check if you have already upvoted an answer on this page and color the cell(s) of the upvoted answer(s). 149 | * If the answer you've upvoted isn't in the first 5 answers, it will show you an alert to inform you that there's a upvoted answer below. 150 | */ 151 | function checkIfIHaveAlreadyUpvotedAnAnswer() { 152 | setTimeout(function () { 153 | let myUpvotesArray = document.getElementsByClassName("js-vote-up-btn fc-theme-primary"); 154 | let allVotesArray = document.getElementsByClassName("js-voting-container"); 155 | 156 | if (myUpvotesArray.length > 0) { 157 | //we add upvotedAnswer css class to the cell in sidebar 158 | for (let i = 0; i < myUpvotesArray.length; i++) { 159 | let myUpvote = myUpvotesArray[i]; 160 | 161 | for (let j = 0; j < allVotesArray.length; j++) { 162 | if (allVotesArray[j] === myUpvote.parentNode) { 163 | if (j > nbAnswersInSidebar) { 164 | alert("You have already upvoted an answer below, check it out."); 165 | return; 166 | } 167 | addUpvotedClassToCellAtIndex(j, true); 168 | } 169 | } 170 | } 171 | } 172 | }, 1000); 173 | } 174 | 175 | 176 | /** 177 | * Add listeners on native SO upvote buttons so that we can `addUpvotedClassToCellAtIndex` when clicking on them. 178 | */ 179 | function addListenerOnUpvoteButtons() { 180 | let upvoteArray = document.getElementsByClassName("js-vote-up-btn"); 181 | 182 | for (let i = 0; i < upvoteArray.length;i++) { //question and answers 183 | let upvoteButton = upvoteArray[i]; 184 | upvoteButton.addEventListener("click", function() { 185 | setTimeout(function () { 186 | if (upvoteButton.classList.contains("fc-theme-primary")) { 187 | addUpvotedClassToCellAtIndex(i, true); 188 | } else { 189 | addUpvotedClassToCellAtIndex(i, false); 190 | } 191 | }, 1); //this very very small delay is necessary so that fc-theme-primary class is set 192 | }); 193 | } 194 | } 195 | 196 | 197 | /** 198 | * Add the `upvotedAnswer` class to the cell at passed index, to indicate that this answer is upvoted by you. 199 | * The `upvotedAnswer` can also be removed if you cancel your upvote. 200 | * @param index the index of the cell to colorize 201 | * @param addUpvoted whether we have to add or remove the class 202 | */ 203 | function addUpvotedClassToCellAtIndex(index, addUpvoted) { 204 | let sideBar = document.getElementsByClassName("social")[0]; 205 | let upvotedAnswerA = sideBar.getElementsByTagName("A")[index]; 206 | if (upvotedAnswerA) { 207 | if (addUpvoted) { 208 | upvotedAnswerA.className = "upvotedAnswer"; 209 | } else { 210 | upvotedAnswerA.className = ""; 211 | } 212 | 213 | if (index === 0) { //for question, also change button text according to status 214 | if (addUpvoted) { 215 | document.getElementById("upvoteQuestionButton").innerText = "Undo upvote"; 216 | } else { 217 | document.getElementById("upvoteQuestionButton").innerText = "Upvote question"; 218 | } 219 | } 220 | } 221 | } 222 | 223 | //endregion 224 | 225 | 226 | 227 | //region Upvote posts 228 | 229 | /** 230 | * Upvote the question. 231 | */ 232 | function upvoteQuestion() { 233 | upvotePostAtIndex(0); 234 | } 235 | 236 | 237 | /** 238 | * Upvote a post at passed index, regardless it is the question or an answer. 239 | * Can also be used to cancel an upvote. 240 | * @param index index of the post 241 | */ 242 | function upvotePostAtIndex(index) { 243 | let allUpvoteButtons = document.getElementsByClassName("js-vote-up-btn"); 244 | if (index < allUpvoteButtons.length) { 245 | allUpvoteButtons[index].click(); 246 | } 247 | } 248 | 249 | //endregion -------------------------------------------------------------------------------- /js/features/hiding_content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Unhide the SO native left sidebar, which doesn't provide value to the user (in my opinion). 3 | * I've decided to hide it by default in CSS, so that we don't see it blink. If user disabled this feature, it will restore the initial display property. 4 | */ 5 | function unhideLeftSidebar() { 6 | document.getElementById("left-sidebar").style.display = 'block'; //I've hidden it by default in CSS, to not see it blink. If feature is disabled, we set it display property back to block 7 | } 8 | 9 | 10 | //region Right sidebar elements 11 | 12 | /** 13 | * Hide the "Hot Network Questions" block from right sidebar to prevent distraction. 14 | */ 15 | function hideHotNetworkQuestions() { 16 | document.getElementById("hot-network-questions").style.display = 'none'; 17 | } 18 | 19 | 20 | /** 21 | * Hide the "Featured on Meta" & "Hot Meta posts" block from right sidebar to prevent distraction. 22 | */ 23 | function hideMetaPosts() { 24 | let metaPostsClass = "s-sidebarwidget s-sidebarwidget__yellow s-anchors"; 25 | if (document.getElementsByClassName(metaPostsClass).length > 0) { 26 | document.getElementsByClassName(metaPostsClass)[0].style.display = 'none'; 27 | } 28 | } 29 | 30 | //endregion -------------------------------------------------------------------------------- /js/features/misc_features.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Add CSS rules to all Vote buttons so that they scroll next to the answer while scrolling. 3 | */ 4 | function addStickyScrollToUpvoteButtons() { 5 | let allUpvoteButtons = document.getElementsByClassName("js-voting-container"); 6 | for (let i = 0; i < allUpvoteButtons.length; i++) { 7 | allUpvoteButtons[i].style.position = "sticky"; 8 | allUpvoteButtons[i].style.top = "50px"; 9 | } 10 | } 11 | 12 | 13 | /** 14 | * Automatically "click" on all "show X more comments" when user use CMD/Ctrl + F to search in page. 15 | * This way the user will also search for text hidden in comments. 16 | * 17 | * Keypress detection : 18 | * metaKey refers to CMD on Mac 19 | * ctrlKey refers to Control on Windows 20 | * keyCode 70 refers to F and keyCode 102 refers to f 21 | * 22 | * @param event 23 | */ 24 | function expandAllCommentsOnCtrlF(event) { 25 | // console.log("key : " + event.keyCode); 26 | // console.log("cmd ? : " + event.metaKey); 27 | 28 | if ((event.metaKey || event.ctrlKey) && (event.keyCode === 70 || event.keyCode === 102)) { 29 | // console.log("CMD+F detected"); 30 | let allShowMoreCommentsLinksArray = document.getElementsByClassName("js-show-link comments-link"); 31 | for (let i = 0; i < allShowMoreCommentsLinksArray.length; i++) { 32 | let showMoreCommentsLink = allShowMoreCommentsLinksArray[i]; 33 | showMoreCommentsLink.click(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /js/features/navigate_through_answers.js: -------------------------------------------------------------------------------- 1 | let currentViewedPost = 0; //by default currentViewedPost is the question, so 0. If `autoScrollFirstAnswerEnabled` feature is enabled, it will be 1. 2 | let isHoldingModifierKey = false; //made to avoid conflict with modifiers keys such as cmd, ctrl, alt, shift… 3 | 4 | 5 | /** 6 | * Scroll to answer at passed index. 7 | * @param index index of the answer to scroll to 8 | * @param smooth whether we want to scroll to the answer smoothly or not 9 | */ 10 | function scrollToAnswerAtIndex(index, smooth) { 11 | let scrollToDiv = document.getElementsByClassName("answer")[index-1]; 12 | 13 | if (index <= 0) { //let's scroll to the top of the question 14 | scrollToDiv = document.getElementById("question-header"); 15 | } 16 | 17 | if (scrollToDiv) { 18 | if (smooth) { 19 | window.scroll({ 20 | top: scrollToDiv.offsetTop, 21 | left: 0, 22 | behavior: 'smooth' 23 | }); 24 | } else { 25 | window.scroll({ 26 | top: scrollToDiv.offsetTop, 27 | left: 0 28 | }); 29 | } 30 | 31 | currentViewedPost = index; 32 | 33 | expandVotesCountOnIndex(index, false); 34 | } 35 | } 36 | 37 | 38 | /** 39 | * Scroll to previous answer. 40 | * Note that `currentViewedPost` isn't updated when you scroll manually between answers. 41 | * @param smooth scroll smoothly or not 42 | */ 43 | function scrollToPreviousAnswer(smooth) { 44 | if (currentViewedPost > 0) { 45 | currentViewedPost--; 46 | scrollToAnswerAtIndex(currentViewedPost, smooth); 47 | } 48 | } 49 | 50 | 51 | /** 52 | * Scroll to next answer. 53 | * Note that `currentViewedPost` isn't updated when you scroll manually between answers. 54 | * @param smooth scroll smoothly or not 55 | */ 56 | function scrollToNextAnswer(smooth) { 57 | if (currentViewedPost < document.getElementsByClassName("answer").length) { 58 | currentViewedPost++; 59 | scrollToAnswerAtIndex(currentViewedPost, smooth); 60 | } 61 | } 62 | 63 | 64 | /** 65 | * Scroll to the better answer than the accepted one. 66 | */ 67 | function scrollToBetterAnswer() { 68 | scrollToAnswerAtIndex(nextAnswerId, true); 69 | } 70 | 71 | 72 | /** 73 | * Will scroll to the first answer immediately after page load. 74 | * 75 | * It will not scroll to the first answer in following cases : 76 | * - Question doesn't have answers 77 | * - URL was meant to directly lead to a specific answer, for example https://stackoverflow.com/a/11303693/4894980 78 | * - Page has been refreshed, and thus we don't want to interfere with Chrome restoring the same scroll location 79 | */ 80 | function scrollToFirstAnswerOnLoad() { 81 | if (!questionHasAlmostOneAnswer()) { //doesn't try to scroll if question hasn't got answers 82 | return; 83 | } 84 | 85 | if(window.location.href.indexOf("#") > -1) { //if an answer id was passed in the URL, don't interfere with it 86 | return; 87 | } 88 | 89 | //Only scroll if page hasn't been reloaded (refreshed), if not it scrolls weirdly 90 | if (performance.navigation.type !== 1) { 91 | currentViewedPost = 1; 92 | 93 | //I'm not using scrollToAnswerAtIndex() as I don't want to expand votesCounts on page load 94 | let nextAnswerDiv = document.getElementsByClassName("answer")[acceptedAnswerId - 1]; 95 | 96 | window.scroll({ 97 | top: nextAnswerDiv.offsetTop, 98 | left: 0 99 | }); 100 | } 101 | } 102 | 103 | 104 | 105 | //region Keystrokes 106 | 107 | /** 108 | * Add key listeners so that we can recognize left/right arrows. 109 | */ 110 | function setupArrowsKeystrokesListeners() { 111 | document.addEventListener("keydown", clickArrowsToScrollAroundPosts, false); 112 | document.addEventListener("keyup", hasReleasedKey, false); 113 | 114 | //when user change tab, it will restore `isHoldingModifierKey`. Because if we change tab with keyboard shortcut, `isHoldingModifierKey` stays true. 115 | document.addEventListener('visibilitychange', function(){ 116 | if (document.hidden) { 117 | isHoldingModifierKey = false; 118 | } 119 | }); 120 | } 121 | 122 | 123 | /** 124 | * Detect left/right arrows keys to navigate through posts. 125 | * Note that smooth scroll cannot be used when using arrow keys (Chrome restriction). 126 | * 127 | * Keypress detection : 128 | * keyCode 37 refers to <- and keyCode 39 refers to -> 129 | * 130 | * @param event event 131 | */ 132 | function clickArrowsToScrollAroundPosts(event) { 133 | // console.log("key : " + event.keyCode); 134 | 135 | //If we are currently writing text in comment box or answer box, don't scroll answers with left/right arrows 136 | let textAreaArray = document.getElementsByTagName("textarea"); 137 | for (let i = 0; i < textAreaArray.length; i++) { 138 | if (textAreaArray[i] === document.activeElement) 139 | return; 140 | } 141 | 142 | if (isHoldingModifierKey) 143 | return; 144 | 145 | if (event.keyCode === 37 || event.keyCode === 39) { 146 | if (event.keyCode === 37) { // left arrow 147 | scrollToPreviousAnswer(false); 148 | } 149 | else if (event.keyCode === 39) { // right arrow 150 | scrollToNextAnswer(false); 151 | } 152 | } else { //different from left/right arrows 153 | isHoldingModifierKey = true; 154 | } 155 | } 156 | 157 | 158 | /** 159 | * Called when releasing a key. It allow to check if user has made a key presses combination instead of just left/right arrow. (for example alt + left/right, etc). 160 | * @param event event 161 | */ 162 | function hasReleasedKey(event) { 163 | if (event.keyCode !== 37 && event.keyCode !== 39) { 164 | isHoldingModifierKey = false; 165 | } 166 | } 167 | 168 | //endregion -------------------------------------------------------------------------------- /js/features/no_answer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check if question hasn't got answers, and show an indicator accordingly. 3 | */ 4 | function showNoAnswerImageOnQuestionIfNeeded() { 5 | if (!questionHasAlmostOneAnswer()) { 6 | showNoAnswerImageOnQuestion(); 7 | } 8 | } 9 | 10 | 11 | /** 12 | * Show a really-disappointed image on the SO question that hasn't got any answers. 13 | */ 14 | function showNoAnswerImageOnQuestion() { 15 | let questionVoteDiv = document.getElementsByClassName("js-voting-container")[questionId]; 16 | 17 | let noAnswerImg = document.createElement("IMG"); 18 | noAnswerImg.src = chrome.runtime.getURL('img/worrying_emoji.png'); 19 | noAnswerImg.width = 40; 20 | 21 | questionVoteDiv.appendChild(noAnswerImg); 22 | } -------------------------------------------------------------------------------- /js/features/screen_features.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Adjust SO page width for large screens. 3 | */ 4 | function adjustPageWidth(pageWidthPercent) { 5 | let container = document.getElementsByClassName("container")[0] 6 | container.style.maxWidth = "100%"; 7 | container.style.padding = "0 70px"; // correlate with width social class in css 8 | pageWidthPercent = Math.min(100, Math.max(50, pageWidthPercent)); //restrict to 50-100 range 9 | document.getElementById("content").style.maxWidth = pageWidthPercent + "%"; 10 | } 11 | -------------------------------------------------------------------------------- /js/helper.js: -------------------------------------------------------------------------------- 1 | //region Booleans 2 | 3 | /** 4 | * Check if current page is a question and not a profile page, questions list, etc. 5 | * @returns {boolean} true if current page is a question, false instead 6 | */ 7 | function currentStackOverflowPageIsAQuestionAnswerPage() { 8 | return document.getElementsByClassName("question-page").length === 1; 9 | } 10 | 11 | 12 | /** 13 | * Check if question has almost one answer. 14 | * @returns {boolean} true if question has one answer or more 15 | */ 16 | function questionHasAlmostOneAnswer() { 17 | return getNbAnswers() !== 0; 18 | } 19 | 20 | 21 | /** 22 | * Check if question has an accepted answer. 23 | * @returns {boolean} true if question has an accepted answer 24 | */ 25 | function questionHasAcceptedAnswer() { 26 | return document.getElementsByClassName("js-accepted-answer-indicator d-none").length > 0; //depuis update SO il y a plusieurs elements avec cette classe, mais un seul n'a pas la classe "d-none" (qui permet de cacher) 27 | } 28 | 29 | 30 | /** 31 | * Check if user is logged into its SO account. 32 | * @returns {boolean} true if user is logged in 33 | */ 34 | function userIsLoggedIn() { 35 | return document.getElementsByClassName("-rep js-header-rep").length > 0; 36 | } 37 | 38 | //endregion 39 | 40 | 41 | 42 | //region Values 43 | 44 | /** 45 | * Get the question number of answers. 46 | * @returns {number} number of answers 47 | */ 48 | function getNbAnswers() { 49 | return document.getElementsByClassName("answer").length; 50 | } 51 | 52 | 53 | /** 54 | * Get the number of votes for answer at passed index. 55 | * @param index index of the answer 56 | * @returns {number} number of votes 57 | */ 58 | function getNbVotesForAnswerAtIndex(index) { 59 | return parseInt((document.getElementsByClassName("js-vote-count")[index]).innerHTML); 60 | } 61 | 62 | 63 | /** 64 | * Get the reputation of the user, as a string. 65 | * It has this kind of format : 342 | 1,872 | 13k 66 | * @returns {string} reputation of user 67 | */ 68 | function getReputationString() { 69 | return document.getElementsByClassName("-rep js-header-rep")[0].innerHTML; 70 | } 71 | 72 | //endregion -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Post IDs 3 | */ 4 | const questionId = 0; 5 | const acceptedAnswerId = 1; //it could also be the first answer if there isn't any accepted answer 6 | const nextAnswerId = 2; 7 | 8 | let userPrefs = {}; 9 | 10 | 11 | /** 12 | * Get the user preferences then execute the code to enable each feature individually. 13 | */ 14 | getUserPrefs(function() { 15 | //Avoid executing code on other SE pages, such as profile, Questions lists, etc 16 | if (!currentStackOverflowPageIsAQuestionAnswerPage()) { 17 | return; 18 | } 19 | 20 | //SIDEBAR 21 | 22 | // sandbox(); 23 | 24 | if (userPrefs.showSidebarEnabled) { 25 | setupSidebarWithVotesCounts(parseInt(userPrefs.nbAnswersInSidebar)); 26 | } 27 | 28 | 29 | //INDICATORS 30 | 31 | if (userPrefs.betterAnswerEnabled) { 32 | showBetterAnswerImageOnAcceptedAnswerIfNeeded(); 33 | } 34 | 35 | if (userPrefs.noAnswerEnabled) { 36 | showNoAnswerImageOnQuestionIfNeeded(); 37 | } 38 | 39 | 40 | //NAVIGATION 41 | 42 | if (userPrefs.autoScrollFirstAnswerEnabled) { 43 | scrollToFirstAnswerOnLoad(); 44 | } 45 | 46 | if (userPrefs.navigationArrowKeysEnabled) { 47 | setupArrowsKeystrokesListeners(); 48 | } 49 | 50 | 51 | //PAGE WIDTH 52 | 53 | if (userPrefs.adjustPageWidthEnabled) { 54 | adjustPageWidth(parseInt(userPrefs.pageWidthPercent)); 55 | } 56 | 57 | 58 | //MISCELLANEOUS 59 | 60 | if (userPrefs.bypassMinRepToViewVoteCountsEnabled) { 61 | setupBypassMinRepToViewVoteCounts(); 62 | } 63 | 64 | if (userPrefs.autoExpandVotesCountEnabled) { 65 | autoExpandVotesCounts(); 66 | } 67 | 68 | if (userPrefs.stickyScrollOnUpvoteButtons) { 69 | addStickyScrollToUpvoteButtons(); 70 | } 71 | 72 | if (userPrefs.expandAllCommentsOnCtrlfEnabled) { 73 | document.addEventListener("keydown", expandAllCommentsOnCtrlF, false); 74 | } 75 | 76 | 77 | //HIDE ELEMENTS 78 | 79 | if (userPrefs.hideHotNetworkQuestions) { 80 | hideHotNetworkQuestions(); 81 | } 82 | 83 | if (userPrefs.hideMetaPosts) { 84 | hideMetaPosts(); 85 | } 86 | 87 | 88 | 89 | 90 | 91 | 92 | }); 93 | 94 | function sandbox() { 95 | //SANDBOX FOR CODE TESTING 96 | //TODO auto click on all upvoted question/answer + add result date in DOM 97 | 98 | //the date popup is shown when clicking again on a previously upvoted answer, and it looks like this: 99 | //

    You last voted on this answer Oct 24 at 14:21. Your vote is now locked in unless this answer is edited.

    100 | 101 | console.log("Sandbox!"); 102 | console.log("Get upvoted date"); 103 | 104 | let body = document.getElementsByTagName("BODY")[0]; //alert direct parent is body (no chance…) 105 | MutationObserver = window.MutationObserver || window.WebKitMutationObserver; 106 | let observer = new MutationObserver(function(mutations, observer) { 107 | console.log("layout changed!"); 108 | 109 | let alertPopup = document.getElementById("js-notice-toast-message"); 110 | if (alertPopup) { 111 | setTimeout(function () { 112 | if (alertPopup.innerText.indexOf("You last voted on this") !== -1) { 113 | 114 | alertPopup.parentNode.parentNode.parentNode.style.display = 'none'; 115 | 116 | let startIndex = alertPopup.innerText.indexOf("answer") !== -1 ? "You last voted on this answer ".length : "You last voted on this question ".length; 117 | 118 | let date = alertPopup.innerText; 119 | date = date.substring(startIndex, date.indexOf(".")); 120 | console.log(date); 121 | 122 | //HERE ADD to DOM 123 | } 124 | 125 | }, 10); 126 | } 127 | 128 | //observer.disconnect(); 129 | }); 130 | 131 | observer.observe(body, { childList:true }); 132 | 133 | 134 | setTimeout(function () { 135 | let allUpvotedButtons = document.getElementsByClassName("js-vote-up-btn fc-theme-primary"); 136 | console.log("allUpvotedButtons " + allUpvotedButtons.length); 137 | for (let i = 0; i < allUpvotedButtons.length; i++) { 138 | setTimeout(function () { 139 | allUpvotedButtons[i].click(); 140 | }, 500 * (i + 1)); 141 | } 142 | }, 200); 143 | } 144 | 145 | 146 | //region UserPrefs 147 | 148 | /** 149 | * Fetch extension settings from Chrome storage. 150 | * @param callback called when preferences are fetched 151 | */ 152 | function getUserPrefs(callback) { 153 | chrome.storage.sync.get({ 154 | betterAnswerEnabled: true, 155 | noAnswerEnabled: true, 156 | autoScrollFirstAnswerEnabled: false, 157 | showSidebarEnabled: true, 158 | nbAnswersInSidebar: 5, 159 | navigationArrowKeysEnabled: true, 160 | bypassMinRepToViewVoteCountsEnabled: true, 161 | autoExpandVotesCountEnabled: true, 162 | stickyScrollOnUpvoteButtons: true, 163 | expandAllCommentsOnCtrlfEnabled: true, 164 | hideHotNetworkQuestions: false, 165 | hideMetaPosts: false, 166 | adjustPageWidthEnabled: false, 167 | pageWidthPercent: 90 168 | }, function(items) { 169 | userPrefs = items; 170 | callback(); 171 | }); 172 | } 173 | 174 | //endregion -------------------------------------------------------------------------------- /js/options_page.js: -------------------------------------------------------------------------------- 1 | let confirmationTimer; 2 | 3 | window.onload = function() { 4 | restoreSettings(); 5 | 6 | //Save settings on each input click 7 | let settingsForm = document.getElementById('settingsForm'); 8 | let allInputs = settingsForm.getElementsByTagName("input"); 9 | 10 | for (let i = 0; i < allInputs.length; i++) { 11 | allInputs[i].addEventListener('change', saveSettings); 12 | } 13 | }; 14 | 15 | 16 | /** 17 | * Saves settings to `chrome.storage` 18 | */ 19 | function saveSettings() { 20 | let betterAnswerEnabled = document.getElementById('betterAnswerEnabled').checked; 21 | let noAnswerEnabled = document.getElementById('noAnswerEnabled').checked; 22 | let autoScrollFirstAnswerEnabled = document.getElementById('autoScrollFirstAnswerEnabled').checked; 23 | let showSidebarEnabled = document.getElementById('showSidebarEnabled').checked; 24 | let nbAnswersInSidebar = document.getElementById('nbAnswersInSidebar').value; 25 | let navigationArrowKeysEnabled = document.getElementById('navigationArrowKeysEnabled').checked; 26 | let bypassMinRepToViewVoteCountsEnabled = document.getElementById('bypassMinRepToViewVoteCountsEnabled').checked; 27 | let autoExpandVotesCountEnabled = document.getElementById('autoExpandVotesCountEnabled').checked; 28 | let stickyScrollOnUpvoteButtons = document.getElementById('stickyScrollOnUpvoteButtons').checked; 29 | let expandAllCommentsOnCtrlfEnabled = document.getElementById('expandAllCommentsOnCtrlfEnabled').checked; 30 | let hideHotNetworkQuestions = document.getElementById('hideHotNetworkQuestions').checked; 31 | let hideMetaPosts = document.getElementById('hideMetaPosts').checked; 32 | let adjustPageWidthEnabled = document.getElementById('adjustPageWidthEnabled').checked; 33 | let pageWidthPercent = document.getElementById('pageWidthPercent').value; 34 | chrome.storage.sync.set({ 35 | betterAnswerEnabled: betterAnswerEnabled, 36 | noAnswerEnabled: noAnswerEnabled, 37 | autoScrollFirstAnswerEnabled: autoScrollFirstAnswerEnabled, 38 | showSidebarEnabled: showSidebarEnabled, 39 | nbAnswersInSidebar: nbAnswersInSidebar, 40 | navigationArrowKeysEnabled: navigationArrowKeysEnabled, 41 | bypassMinRepToViewVoteCountsEnabled: bypassMinRepToViewVoteCountsEnabled, 42 | autoExpandVotesCountEnabled: autoExpandVotesCountEnabled, 43 | stickyScrollOnUpvoteButtons: stickyScrollOnUpvoteButtons, 44 | expandAllCommentsOnCtrlfEnabled: expandAllCommentsOnCtrlfEnabled, 45 | hideHotNetworkQuestions: hideHotNetworkQuestions, 46 | hideMetaPosts: hideMetaPosts, 47 | adjustPageWidthEnabled: adjustPageWidthEnabled, 48 | pageWidthPercent: pageWidthPercent 49 | }, function() { 50 | showSaveConfirmation(); 51 | return false; 52 | }); 53 | } 54 | 55 | 56 | /** 57 | * Restore previous settings that are stored in `chrome.storage` 58 | */ 59 | function restoreSettings() { 60 | chrome.storage.sync.get({ 61 | betterAnswerEnabled: true, 62 | noAnswerEnabled: true, 63 | autoScrollFirstAnswerEnabled: false, 64 | showSidebarEnabled: true, 65 | nbAnswersInSidebar: 5, 66 | navigationArrowKeysEnabled: true, 67 | bypassMinRepToViewVoteCountsEnabled: true, 68 | autoExpandVotesCountEnabled: true, 69 | stickyScrollOnUpvoteButtons: true, 70 | expandAllCommentsOnCtrlfEnabled: true, 71 | hideHotNetworkQuestions: false, 72 | hideMetaPosts: false, 73 | adjustPageWidthEnabled: false, 74 | pageWidthPercent: 90 75 | }, function(items) { 76 | document.getElementById('betterAnswerEnabled').checked = items.betterAnswerEnabled; 77 | document.getElementById('noAnswerEnabled').checked = items.noAnswerEnabled; 78 | document.getElementById('autoScrollFirstAnswerEnabled').checked = items.autoScrollFirstAnswerEnabled; 79 | document.getElementById('showSidebarEnabled').checked = items.showSidebarEnabled; 80 | document.getElementById('nbAnswersInSidebar').value = items.nbAnswersInSidebar; 81 | document.getElementById('navigationArrowKeysEnabled').checked = items.navigationArrowKeysEnabled; 82 | document.getElementById('bypassMinRepToViewVoteCountsEnabled').checked = items.bypassMinRepToViewVoteCountsEnabled; 83 | document.getElementById('autoExpandVotesCountEnabled').checked = items.autoExpandVotesCountEnabled; 84 | document.getElementById('stickyScrollOnUpvoteButtons').checked = items.stickyScrollOnUpvoteButtons; 85 | document.getElementById('expandAllCommentsOnCtrlfEnabled').checked = items.expandAllCommentsOnCtrlfEnabled; 86 | document.getElementById('hideHotNetworkQuestions').checked = items.hideHotNetworkQuestions; 87 | document.getElementById('hideMetaPosts').checked = items.hideMetaPosts; 88 | document.getElementById('adjustPageWidthEnabled').checked = items.adjustPageWidthEnabled; 89 | document.getElementById('pageWidthPercent').value = items.pageWidthPercent; 90 | }); 91 | } 92 | 93 | 94 | /** 95 | * Quickly show a Saved confirmation bottom bar 96 | */ 97 | function showSaveConfirmation() { 98 | clearTimeout(confirmationTimer); //clear any previous timer 99 | 100 | document.getElementById('saveConfirmationBottomBar').style.display = "block"; 101 | confirmationTimer = setTimeout(function() { 102 | document.getElementById('saveConfirmationBottomBar').style.display = "none"; 103 | }, 2000); 104 | } 105 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | 4 | "name": "StackOverflow Power User", 5 | "short_name": "SO Power User", 6 | "version": "0.4.2", 7 | "description": "Stop wasting time while programming! Adds many features to save time when searching for solutions on StackOverflow", 8 | 9 | "content_scripts": [{ 10 | "css": ["css/content_style.css", "css/floating_sidebar.css"], 11 | "js": ["js/main.js", 12 | "js/helper.js", 13 | "js/features/better_answer.js", 14 | "js/features/bypass_min_rep_view_vote_counts.js", 15 | "js/features/expand_votes_counts.js", 16 | "js/features/floating_sidebar.js", 17 | "js/features/hiding_content.js", 18 | "js/features/misc_features.js", 19 | "js/features/no_answer.js", 20 | "js/features/navigate_through_answers.js", 21 | "js/features/screen_features.js"], 22 | "matches": ["https://*.stackoverflow.com/questions/*/*", 23 | "https://*.superuser.com/questions/*/*", 24 | "https://*.stackexchange.com/questions/*/*", 25 | "https://*.stackapps.com/*/*", 26 | "https://*.askubuntu.com/*/*", 27 | "https://*.serverfault.com/*/*", 28 | "https://*.mathoverflow.net/*/*", 29 | "https://*.meta.stackoverflow.com/*/*", 30 | "https://*.meta.stackexchange.com/*/*"] 31 | }], 32 | 33 | "web_accessible_resources": [{ 34 | "resources": [ 35 | "img/*", 36 | "js/externals/bypass_min_rep_view_vote_counts_script.js" 37 | ], 38 | "matches": [""] 39 | }], 40 | 41 | "permissions": ["storage"], 42 | "options_page": "options_page.html", 43 | "icons": { 44 | "128": "img/icons/icon_128x128.png", 45 | "48": "img/icons/icon_48x48.png", 46 | "16": "img/icons/icon_16x16.png" 47 | }, 48 | 49 | "background": { 50 | "service_worker": "js/background.js" 51 | } 52 | } -------------------------------------------------------------------------------- /options_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StackOverflow Power User Options 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |
    16 | 17 | StackOverflow Power User 18 |
    19 | Stop wasting time while programming! 20 | 21 |
    22 | 23 |

    Settings

    24 |
    25 |
    26 |

    Sidebar

    27 | 28 | 29 | 30 |
    31 | 32 | 33 |
    Shows a floating sidebar on the left that shows score of first 5 answers, as sometimes it can be 34 | interesting to read other well upvoted answers. It will also inform you if you have already upvoted an answer 35 | previously on this page. You can also hover the first cell to get additional information about the current 36 | page. (Try it) 37 | 38 | 39 |

    Indicators

    40 | 41 | 42 | 43 |
    If a question has a better answer than the accepted one, it shows an clickable arrow to easily notice 44 | it and avoid wasting time. (Try it) 45 |

    46 | 47 | 48 | 49 |
    If a question has no answer, it shows a disappointed smiley to easily notice it and avoid wasting time 50 | reading the question. (Try it) 51 | 52 | 53 |

    Navigation

    54 | 55 | 56 | 57 |
    Automatically scroll to the first answer, as you usually don't have to read the question. (Try it) 58 |

    59 | 60 | 61 | 62 |
    Give the ability to navigate through all answers without having to remove your hands from 63 | keyboard. (Try it) 64 | 65 | 66 |

    Page width

    67 | 68 | 69 |
    70 | 71 | % 72 |
    Extends the width of the main container to take full advantage of large screens. Authorized range is 50-100%. (Try it) 73 | 74 | 75 |

    Miscellaneous

    76 | 77 | 78 | 79 |
    Enable expanding view vote counts even when you're under 1000 reputation or not logged in. (Try it) 80 |
    Thanks to Rob W and thedemons for making this possible. 81 |

    82 | 83 | 84 | 85 |
    You need to enable "Bypass minimum reputation to view vote counts" or have at least 1000 reputation on StackOverflow for this feature to work. 86 | When arriving on Stack Overflow page, it automatically expand votes count (upvotes/downvotes) and shows the 87 | score of the answer (in percent). (Try it) 88 |

    89 | 90 | 91 | 92 |
    Make vote buttons scroll so that they are still visible even on long posts. (Try it) 93 |

    94 | 95 | 96 | 98 |
    Automatically expand all "show X more comments" when you use CMD/Ctrl + F to search in page. This way 99 | you ensure that you're not missing any result. (Try it) 100 | 101 | 102 |

    Hide elements

    103 | 104 | 105 | 106 |
    Just hide this block to prevent distraction. (Try it) 107 |

    108 | 109 | 110 | 111 |
    Just hide this block to prevent distraction. (Try it) 112 | 113 |
    114 | 115 | 116 |

    Support me

    117 |
    118 |

    119 | If you find this extension useful, you can consider supporting me by doing one of the following: 120 | 121 |

    122 | 123 |
    124 | 125 |
    126 | 127 |
    128 |

    129 | 130 | 131 |

    Give me feedback

    132 |
    133 |

    134 | I would love to hear your feedback about this extension. Do not hesitate to contact me if you have any 135 | question/feature request. If you are enjoying the extension, please leave a review on Chrome Store. 136 | 137 |

    139 | 140 |
    141 | 142 |
    143 | 144 |
    145 |

    146 | 147 | 148 |

    Contribute on GitHub

    149 |
    150 |

    151 | StackOverflow Power User is now open source! Feel free to submit a PR to add a feature or fix a bug. You can 152 | also submit bugs reports or feature requests. We can gain even more productivity with your help! 153 | 154 |

    155 | 156 |
    157 |

    158 | 159 | 160 |

    Changelog - What's new?

    161 |
    162 |

    163 | In the last update (0.4.2) :
    164 | - Add a feature to make SO page wider to take full advantage of large screens. It can be enabled and adjusted from options page. Thanks to AndyPLsql.
    165 | - Sidebar: number of answers in the sidebar is now configurable
    166 | - Fix "Hide Hot Meta posts" feature for the new DOM update 167 | 168 |

    169 | 170 |
    171 |

    172 | 173 | 174 | 178 |
    179 | 180 | 181 |
    182 | Settings saved! 183 |
    184 | 185 | --------------------------------------------------------------------------------