├── .gitmodules ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── changelog.txt ├── css ├── common.css ├── nabnotify.css ├── newznab.css ├── nzbmatrix.css ├── popup.css └── settings.css ├── images ├── addon_icon.svg ├── content_icon.png ├── content_icon_error.png ├── content_icon_fetching.png ├── content_icon_success.png ├── control_cancel.png ├── control_pause.png ├── control_play.png ├── sab_128.png └── sab_48.png ├── manifest.json ├── popup.html ├── project └── sabconnect++.pnproj ├── scripts ├── content │ ├── animenzb.js │ ├── animezb.js │ ├── binsearch.js │ ├── bintube.js │ ├── common.js │ ├── dognzb.js │ ├── fanzub.js │ ├── newznab.js │ ├── nzbclub.js │ ├── nzbindex.js │ ├── nzbrss.js │ ├── omgwtfnzbs.js │ ├── usenet4ever.js │ └── yubse.js ├── convert.js ├── pages │ ├── background.js │ ├── common.js │ ├── context_menu.js │ ├── localization.js │ ├── manifest.js │ ├── newznab-autoadd.js │ ├── newznab-check.js │ ├── popup.js │ └── settings.js ├── profile.js └── utility.js ├── settings.html └── third_party ├── jqplot ├── jqplot.barRenderer.js ├── jqplot.pointLabels.js ├── jquery.jqplot.css └── jquery.jqplot.js ├── jquery ├── jquery-1.12.4.min.js ├── jquery-ui-1.8.20.sortable.min.js ├── jquery.notify.js └── jquery.urldecoder.min.js └── webtoolkit └── webtoolkit.base64.js /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third_party/fancy-settings"] 2 | path = third_party/fancy-settings 3 | url = git://github.com/jsterken/fancy-settings.git 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Sadly, there is no more 'main developer' working on this Chrome extension. 2 | Past developers who worked on most of the code have now stopped working on it. 3 | 4 | If you are interested in taking charge of this extension, let us know by opening a new issue. 5 | 6 | Otherwise, keep the Pull requests coming; I (Guillaume Boudreau) will try to merge them and release new versions that include the changes on the Chrome Web Store ASAP. 7 | 8 | Cheers. 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | **Important note:** 3 | Nobody is maintaining this codebase right now. Anyone who needs a fix will need to submit a Pull Request with the required changes. 4 | 5 | --- 6 | 7 | SABconnect++ adds one-click 'Send to SABnzbd' buttons to many popular NZB index sites. 8 | 9 | You also get a taskbar button that allows you to keep an eye on your SABnzbd: current downloads, pause (individual downloads, or pause all), or remove individual queued downloads. 10 | 11 | Install SABconnect++ at our [Chrome Web Store page](https://chrome.google.com/webstore/detail/okphadhbbjadcifjplhifajfacbkkbod). 12 | 13 | Features: 14 | 15 | * One-click NZB downloads for the following sites: 16 | * binsearch.info (binsearch.net) 17 | * bintube.com 18 | * dognzb.com 19 | * fanzub.com 20 | * nzbclub.com 21 | * nzbindex.com (nzbindex.nl) 22 | * omgwtfnzbs.me 23 | * yubse.com 24 | * animezb.com 25 | * animenzb.com 26 | * Any Newznab-based indexer 27 | * Context menu option for sending links to SABnzbd 28 | * Options page that looks consistent with Chrome's own options layout 29 | * Download speed graph 30 | * Pause individual downloads 31 | * Pause all downloads 32 | * Remove individual downloads 33 | * Desktop notifications (Download Complete/Failed) 34 | * Storage sync for settings 35 | 36 | SABconnect++ is a fork of the now unmaintained Chrome extension [SABconnect](http://code.google.com/p/sabconnect/). 37 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Version 0.6.37 2 | -------------- 3 | Fix for latest Chrome version that removed chrome.extension (thanks jeremybergen) 4 | 5 | Version 0.6.36 6 | -------------- 7 | omgwtfnzbs TLD has changed from omgwtfnzbs.me back to omgwtfnzbs.org 8 | 9 | Version 0.6.35 10 | -------------- 11 | Fixed downloads on Dognzb (thanks jeremybergen) 12 | 13 | Version 0.6.34 14 | -------------- 15 | Fixed Generic newznab (drunkenslug) category detection (thanks jdart) 16 | 17 | Version 0.6.33 18 | -------------- 19 | Enable context menu on https pages (thanks sakana280) 20 | 21 | Version 0.6.32 22 | -------------- 23 | Fix style for omgwtfnzbs.me #190 (thanks omgstaff) 24 | 25 | Version 0.6.31 26 | -------------- 27 | Fix nzbindex (thanks gissehel) 28 | 29 | Version 0.6.30 30 | -------------- 31 | Fix jqPlot (thanks flo333) 32 | Replace 'KBps' with '%' for max speed 33 | 34 | Version 0.6.29 35 | -------------- 36 | Fix for autoscrolling webpages (thanks kbuffington) 37 | 38 | Version 0.6.28 39 | -------------- 40 | DrunkenSlug.com: fixed how the query string is found in the page; fixed how the href is found in list view (thanks jdart) 41 | 42 | Version 0.6.27 43 | -------------- 44 | omgwtfnzbs.me: Cleaned up Category Discovery (thanks omgstaff) 45 | 46 | Version 0.6.26 47 | -------------- 48 | omgwtfnzbs.me: Updated getUserName and getApiKey (thanks omgstaff) 49 | 50 | Version 0.6.25 51 | -------------- 52 | Fixed omgwtfnzbs.me: username changed in HTML (thanks omgstaff) 53 | 54 | Version 0.6.24 55 | -------------- 56 | Fixed omgwtfnzbs.me: nzbId length has increased on site from 5 to 6 (thanks omgstaff) 57 | 58 | Version 0.6.23 59 | -------------- 60 | Fixed omgwtfnzbs.me: send Category now on browse.php/details.php/trends.php pages; support for Cart; fixed README/label (thanks omgstaff) 61 | 62 | Version 0.6.22 63 | -------------- 64 | Added category discovery for details.php and trends.php on their website so that it sends to sabnzb with the proper category. Also the TLD has changed from omgwtfnzbs.org to omgwtfnzbs.me (thanks gewfie) 65 | 66 | Version 0.6.20 67 | -------------- 68 | (again) Fixed nzbclub integration (thanks Mathias Rohnstock) 69 | 70 | Version 0.6.19 71 | -------------- 72 | Fixed nzbclub integration (thanks Mathias Rohnstock) 73 | 74 | Version 0.6.18 75 | -------------- 76 | Corrected support for animenzb.com - Incorrectly named provider 77 | Removed exec bit from usenet4ever provider 78 | 79 | Version 0.6.17 80 | -------------- 81 | Added support for animenzb.com (credit PPSlim) 82 | 83 | Version 0.6.16 84 | -------------- 85 | Fixed omgwtfnzbs.org support 86 | 87 | Version 0.6.15 88 | -------------- 89 | Added support for usenet4ever.info (thanks Marat Bedoev) 90 | Replaced (deprecated) webkit notifications with Chrome notifications (thanks Marat Bedoev) 91 | Option to disable Newznab auto detection (thanks Omri Iluz) 92 | 93 | Version 0.6.14 94 | -------------- 95 | Added support for animezb.com (thanks Benni-chan) 96 | 97 | Version 0.6.13 98 | -------------- 99 | Fix icon size on dognzbd. 100 | 101 | Version 0.6.11 102 | -------------- 103 | More bugfixes for dognzbd. Fixes #96, #102. 104 | 105 | Version 0.6.10 106 | -------------- 107 | Bugfix for dognzbd. Fixes #106. 108 | 109 | Version 0.6.9 110 | ------------- 111 | Change notification mechanism to use a single timeout handler, rather than one per notification. Fixes #99. 112 | Bugfix for some Newznab themes: show the notification over other UI elements 113 | Added setting to not send any categories to SAB, and let it try to guess it from the .nzb content instead. Default to off for now (i.e. same behaviour as before) 114 | 115 | Version 0.6.8 116 | ------------- 117 | Improved nzbs.org support (and all Newznab at the same time) 118 | Removed support for nzbx.co (read here to know why it shut down: http://www.dslreports.com/forum/r28443268-nzbx.co-shuts-down) 119 | Removed support for nzbsrus.com (read here to know why it shut down: http://sickbeard.com/forums/viewtopic.php?f=3&t=7596) 120 | Added support for nzb-rss.com (thanks brandon-barker) 121 | 122 | Version 0.6.7 123 | ------------- 124 | Improved Newznab support (tested on nzb.su): one-click links in details page, fixed cart, fixed double links 125 | Added support for omgwtfnzbs.org: added categories (thanks brandon-barker) 126 | 127 | Version 0.6.6 128 | ------------- 129 | Added support for omgwtfnzbs.org (thanks brandon-barker) 130 | 131 | Version 0.6.5 132 | ------------- 133 | Added support for nzbsrus.com categories 134 | Removed nzb.su from the list of providers; it's now a Newznab indexer 135 | 136 | Version 0.6.4 137 | ------------- 138 | ... 139 | 140 | Version 0.6.3 141 | ------------- 142 | Added support for mega.nzbx.co 143 | Improvement: Added multi-select to nzbx.co 144 | Bugfix: nzbx.co no category failure fixed 145 | 146 | Version 0.6.2 147 | ------------- 148 | Re-added: dognzb.cr 149 | 150 | Version 0.6.1 151 | ------------- 152 | Re-added: nzb.su 153 | 154 | Version 0.6.0 155 | ------------- 156 | New feature: Settings are now synced to and from your Google account, if you enabled sync in Chrome. 157 | Improvement: One-click support for binsearch.info 158 | Improvement: Added category for nzbx.co one-click 159 | Removed: nzb.su, mysterbin.com support (sites are gone) 160 | 161 | Version 0.5.22 162 | -------------- 163 | Improvement: Better looking icons, in particular in the action bar 164 | Improvement: Ability to pause for X minutes (thanks jsterken) 165 | Improvement: Code improvement on how domain and protocol are handled, when sending a link to SAB. Solves part of the NZBClub problem. (thanks jsterken) 166 | Bugfix: SAB icon would not change to the red error icons, when an error occurred when sending a link to SAB. (thanks jsterken) 167 | Bugfix: Newznab providers: when a cover has multiple releases, send the correct URL to SAB (was always sending the 1st release URL) (thanks jsterken) 168 | 169 | Version 0.5.21 170 | -------------- 171 | Bugfix: Newznab sites: select all checkbox would break the 'Send to SAB' top button 172 | Improved fanzub support (thanks Benni-chan) 173 | Added support for nzbx.co (thanks sharkuw) 174 | 175 | Version 0.5.20 176 | -------------- 177 | Shorter notifications timeout available (1, 2, 3, 5 seconds) 178 | Bugfix: right-click "Send link to SAB" never worked. Now it should work, at least on sites that don't require a login to download NZBs. 179 | Bugfix: support for arbitrary Newznab providers setting wasn't saved correctly. 180 | 181 | Version 0.5.19 182 | -------------- 183 | Added support for arbitrary Newznab providers. 184 | Newznab (nzbs.org, etc.): Added 1-click button in Cover view 185 | Removed NZBMatrix & Newzbin settings (sites are gone). 186 | 187 | Version 0.5.18 188 | -------------- 189 | Better nzb.su implementation (thanks Benni-chan) 190 | Removed NZBMatrix & Newzbin support (sites are gone) 191 | 192 | Version 0.5.17 193 | -------------- 194 | Bugfix: popup was broken when an item was paused. (thanks eegeeZA) 195 | Bugfix: Fixed download button on dognzb.cr (thanks VTWoods) 196 | 197 | Version 0.5.16 198 | -------------- 199 | Bugfix: Remove unneeded labels on graph 200 | 201 | Version 0.5.15 202 | -------------- 203 | More NZBRus fixes 204 | Fix for missing notification icon 205 | 206 | Version 0.5.14 207 | -------------- 208 | Added ability to override categories from popup menu (thanks mattb3) 209 | Fix for non-working NZBRus (thanks rolfwessels) 210 | 211 | Version 0.5.13 212 | -------------- 213 | Added support for mysterbin.com (thanks mattb3) 214 | Improvement: Somehow improved the graph. Doesn't show when empty, etc. 215 | Task: updated Chrome extension manifest to latest version (2). Previous version (1) will be deprecated in Chrome soon, so this was needed to keep the extension working. 216 | 217 | Version 0.5.12 218 | -------------- 219 | Added support for yubse.com (thanks tofito) 220 | Added support for Newzxxx2.ch 221 | Bugfix: Don't send default category for NZBMatrix downloads 222 | 223 | Version 0.5.11 224 | -------------- 225 | Bugfix: missing queued items and graph in popup 226 | 227 | Version 0.5.10 228 | -------------- 229 | Bugfix: Missing profiles names from select box in popup 230 | 231 | Version 0.5.9 232 | ------------- 233 | Added support for dognzb.cr (thanks to commits from wolrah & gboudreau) 234 | Added support for www.nzbhq.com 235 | Bugfix: Now working with the new nzbs.org (thanks to commits from wolrah, jdart & gboudreau) 236 | Bugfix: Always use https for binsearch.info URLs. 237 | 238 | Version 0.5.8 239 | ------------- 240 | Change [Issue 124]: Added newzbin2.es and removed old newzbin.com 241 | 242 | Version 0.5.7 243 | ------------- 244 | Change [Issue 37]: 1-Click on individual posts on newzbin, not just search list (Thanks fabian) 245 | Bugfix [Issue 107]: nzbxxx.com 1-click was not working due to incorrect API URL usage. 246 | 247 | Version 0.5.6 248 | ------------- 249 | Feature: [Issue 85]: Save multiple SABnzbd connections with quick change option from popup. 250 | Bugfix: [Issue 87]: nzbsrus.com changed their HTML in the browse & search pages. 251 | 252 | Version 0.5.5 253 | ------------- 254 | Feature: [Issue 51]: Max Speed for SABnzbd can now be set in the popup. You can press the ENTER key in the input field to accept the changes or click the "Set" button. 255 | Bugfix: [Issue 81]: nzb.su anime series page doesn't have 1-click. 256 | 257 | Version 0.5.4 258 | ------------- 259 | Change: The "nice names" for binsearch.info have been simplified. Thanks to "thibaut....@gmail.com" for this. 260 | Change: The Categories section of the Configuration tab in Options now has a summary paragraph with a link to the Categories wiki page on our Google Code project page. 261 | Bugfix: (Regression) [Issue 77] "Open SABnzbd" link in the popup was not working for https connections. 262 | 263 | Version 0.5.3 264 | ------------- 265 | Feature: New option to enable automatic authentication. This feature automatically provides your SABnzbd username & password to SABnzbd through URL parameters so you don't have to type in your username & password manually when you click the "Open SABnzbd" button in the popup. Enabled by default. 266 | Change: If options are changed in the extension, tabs currently open for indexer sites automatically pick up those changes. Previously the website had to be refreshed by the user to pick up changes in options (such as nzbxxx username & api key). 267 | 268 | Version 0.5.2 269 | ------------- 270 | Bugfix: X-DNZB-Category was not working on compatible sites. 271 | Bugfix: NZBmatrix was not working in iframes (Issue 60) 272 | 273 | Version 0.5.1 274 | ------------- 275 | Change: Fresh new icon (the smaller 16x16 icon remains the same) 276 | Change: 'Notification Timeout' setting now defaults to 10 seconds (previously defaulted to Disabled). 277 | Bugfix: (Regression) 'Enable Context Menu' option was not working. 278 | Bugfix: (Regression) binsearch.info wasn't working. 279 | Bugfix: Renamed the display options check boxes in settings to mean the reverse of what they meant before (i.e. Keeping them checked actually enables nice display names). 280 | Bugfix: (Regression) 'Pause Queue' popup option was missing. 281 | 282 | Version 0.5.0 283 | ------------- 284 | Feature: "Send link to SABnzbd" link added to chrome context menu for http links. Note that this feature is not intended to be used on links that will require authentication. 285 | Feature: New setting in options page to enable/disable the new context menu. 286 | Feature: Added support for fanzub 287 | Feature: Completely redesigned Options page 288 | Change: Removed newzleech support since that website is down. 289 | Change: Extreme architecture change that fixes many bugs and improves stability. 290 | Bugfix: Fixed continuous memory leaks happening during refreshes. 291 | Bugfix: SabConnect++ no longer crashes after a period of time. 292 | Bugfix: Several script errors eliminated and stability improved. 293 | 294 | Version 0.4.12 295 | -------------- 296 | New feature: Added 1-click NZB download for fanzub.com 297 | Improvement: Allow 1, 2 or 4 hours refresh rates, or disabling background refresh altogether 298 | Bugfix: fixing 1-click for nzbclub.com 299 | Bugfix: Missing 1-click downloads on binsearch.info Watchlist 300 | Bugfix: AJAX search results on nzbsrus.com didn't show the 1-click SAB icons 301 | 302 | Version 0.4.11 303 | -------------- 304 | Bugfix: Now working in Chrome 12 (dev) 305 | 306 | Version 0.4.10 307 | -------------- 308 | New feature: Added 1-click NZB download for nzb.su (Newznab). 309 | Note: SABconnect++ won't send a category when using cover view. This is because those views don't display the categories. 310 | 311 | Version 0.4.9 312 | ------------- 313 | Improvement: Timeout for notifications (to disappear) is now configurable. Default is to keep them open indefinitely. 314 | Improvement: Allow you to use the X-DNZB-Category HTTP header on sites that supports it (nzbs.org, Newzbin), instead of using the default auto-categorization. The X-DNZB-Category header will only contain the main category (eg. 'TV'), versus auto-categorization that will contain the full category name (eg. TV.x264) http://code.google.com/p/sabconnectplusplus/issues/detail?id=18 315 | Improvement: Added individual 1-click NZB download buttons to nzbindex.com http://code.google.com/p/sabconnectplusplus/issues/detail?id=20 316 | Improvement: Added option to use the NZB file name, instead of the full name displayed on the website, for nzbindex.com and binsearch.info http://code.google.com/p/sabconnectplusplus/issues/detail?id=20 317 | Bugfix: Show 'Download Failed' notifications instead of 'Download Complete' when appropriate. 318 | 319 | Version 0.4.8 320 | ------------- 321 | New feature: "Download Complete" desktop notifications 322 | New feature: "Hard-coded category" & "Default category" options, to override NZB index site categories, or send a default when no category is found on the NZB index site. 323 | Bugfix: nzbs.org auto-categorization didn't work on homepage (Browse All NZBs) 324 | Bugfix: NZBXXX.com 1-click NZB download was not working; added Username & API Key options in the extension options to fix. http://code.google.com/p/sabconnectplusplus/issues/detail?id=12 325 | Bugfix: Some search results & subsequent results pages wouldn't show the 1-click NZB download buttons. http://code.google.com/p/sabconnectplusplus/issues/detail?id=11 326 | 327 | Version 0.4.7 328 | ------------- 329 | Improvement: Auto-categorization for nzbs.org. Categories are named "Console.XBox360", "TV.x264", etc. and need to match a category NAME you have defined in SABnzbd. See http://code.google.com/p/sabconnectplusplus/wiki/Categories#nzbs.org for details. 330 | 331 | Version 0.4.6 332 | ------------- 333 | Bugfix: 0.4.5 broke 1-click NZB download buttons on nzbs.org, in list view 334 | Bugfix: 1-click NZB download button on nzbs.org details page looked weird after click 335 | 336 | Version 0.4.5 337 | ------------- 338 | Bugfix: bandwidth graph wasn't working; thanks to Sajid Anwar for the fix. 339 | New feature: Added 1-click NZB download for nzbindex.nl 340 | Improvement: Added 'Send selected to SABnzbd' buttons on nzbs.org, to send multiple NZBs to SAB in one click. 341 | Improvement: Preload graph image in the background to remove flickering. 342 | Improvement: Added manual refresh menu item. 343 | Improvement: Allow user to change refresh rate. 344 | Improvement: Number of developers working on SABconnect++ increased! Welcome Sajid Anwar! 345 | 346 | Version 0.4.4 347 | ------------- 348 | New feature: Added 1-click NZB download for NZBsRus.com 349 | 350 | Version 0.4.3 351 | ------------- 352 | Bugfix: newzbin.com "Send to SABnzbd" button was broken. 353 | New feature: Added 1-click NZB download for newzleech.com; thanks to johannespfau for the patch. 354 | New feature: Added 1-click NZB download to nzbs.org details page. 355 | Improvement: nzbs.org: Made it clearer that the SAB 1-click icon and the download link are distinct. 356 | Improvement: Removed badge text (# queued items) instead of displaying '0'. 357 | 358 | Version 0.4.2 359 | ------------- 360 | New feature: double-click the toolbar icon to open SABnzbd. 361 | Note: Chrome doesn't support this natively. 362 | The extension tries to detect if you tried to open the popup twice fast enough, and will open SABnzbd if it detects you did. 363 | You might want to continue clicking on the toolbar icon until a new tab opens, if just double-clicking doesn't work for you. 364 | Bugfix (Issue #1): one-click NZB button was missing from binsearch.net (same as binsearch.info); thanks evertbeurskens for the patch. 365 | Bugfix: "Enable Graph" option couldn't be disabled. 366 | 367 | Version 0.4.1 368 | ------------- 369 | New feature: Added nzbindex.com 1-click NZB downloads 370 | Auto-categorization: 1st group that appears in "Group" column on nzbindex.com will be sent as the Category. Make sure to create categories that have names equal to the groups you usually download from (eg. a.b.sounds.mp3.french). Sorry, but there's no way I can use the SABnzbd 'group' field using the API... :\ 371 | Bugfix: SABnzbd icons (used to send a NZB to SABnzbd) changed to 'fetching' (green arrows), but never changed to 'OK' (green logo). Cosmetic bugfix; the actual send operation worked fine. 372 | 373 | Version 0.4 374 | ----------- 375 | New feature: Added nzbs.org 1-click NZB downloads (code comes from SABConnect, slightly modified) http://code.google.com/p/sabconnect/issues/detail?id=4 376 | New feature: Added binsearch.info 1-click NZB downloads. http://code.google.com/p/sabconnect/issues/detail?id=8 377 | Auto-categorization: 1st group that appears in "Group" column on binsearch.info will be sent as the Category. Make sure to create categories that have names equal to the groups you usually download from (eg. a.b.sounds.mp3.french). Sorry, but there's no way I can use the SABnzbd 'group' field using the API... :\ 378 | New feature: Thanks to SABnzbd 0.5.3, auto-categorization for NZBMatrix.com! :) 379 | Documentation here: http://wiki.sabnzbd.org/configure-categories 380 | Example SABnzbd categories you need to create: http://cl.ly/eec6e7308ee01f800b3d 381 | Improvement: Re-enabled the option to show a graph in popup. 382 | Bugfix: Fixed 1-click for all services in latest (dev) Chrome; it wasn't sending to SABnzbd anymore; was just downloading the NZB locally instead. 383 | Bugfix: Options page that wasn't working at all in latest (dev) Chrome. 384 | Bugfix: Options page checkboxes: trying to uncheck any service would 'appear' to not work: checkbox would still be checked when reloading the options page. 385 | Bugfix: Disabling a service in the options page didn't disable 1-click NZB downloads! 386 | Bugfix: Connection to SABnzbd now works even if the user chose to "Disable API-key" in SABnzbd settings. 387 | Bugfix: Popup always showed 'Resume queue' even if the queue wasn't paused. 388 | Bugfix: Status (at the top of popup) would stay red (paused color) if you paused then resumed. 389 | Bugfix: NZBMatrix.com download URLs had the hostname twice in them! http://code.google.com/p/sabconnect/issues/detail?id=9 390 | -------------------------------------------------------------------------------- /css/common.css: -------------------------------------------------------------------------------- 1 | .serversPriorities ul, 2 | .serversPriorities ul li 3 | { 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | .serversPriorities ul { 9 | padding: 0 5px; 10 | } 11 | 12 | .serversPriorities ul li { 13 | list-style-type: none; 14 | } -------------------------------------------------------------------------------- /css/nabnotify.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .autonabSticky p { float:left; padding:0px; margin:0px; margin-left:10px; line-height:45px; color:#fff; font-size:12px;} 4 | .autonabSticky p a { color:#fbffa2; } 5 | .autonabSticky a.close { float:right; margin:13px 10px 0px 0px; color:#fff; font-size: 14px;} 6 | .autonabSticky { 7 | position: fixed; 8 | top: 0; 9 | left: 0; 10 | z-index: 999999999; 11 | width: 100%; 12 | border-bottom: 3px solid #fff !important; 13 | height: 45px; 14 | background-color: #91BD09; 15 | box-shadow: 1px 1px 7px #676767; 16 | } 17 | -------------------------------------------------------------------------------- /css/newznab.css: -------------------------------------------------------------------------------- 1 | 2 | #browsetable a.addSABnzbd { 3 | margin-right: 3px; position: relative; top: 3px; 4 | } 5 | 6 | #infohead div.icon { 7 | float: none; 8 | display: inline; 9 | top: 4px; 10 | } -------------------------------------------------------------------------------- /css/nzbmatrix.css: -------------------------------------------------------------------------------- 1 | span.downloadButton { 2 | display: inline-block; 3 | width: 171px; 4 | height: 26px; 5 | text-decoration: none; 6 | color: black; 7 | position: relative; 8 | top: -15px; 9 | } 10 | 11 | span.downloadButton .text { 12 | position: relative; 13 | top: 5px; 14 | } 15 | 16 | span.downloadButton img { 17 | position: relative; 18 | top: 5px; 19 | } 20 | 21 | a:.downloadButton:hover { 22 | text-decoration: none; 23 | } 24 | -------------------------------------------------------------------------------- /css/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | overflow: hidden; 3 | margin: 0; 4 | padding: 4px; 5 | font-family: tahoma, sans-serif; 6 | width: 230px; 7 | } 8 | 9 | .menu div { 10 | background-color: white; 11 | color: black; 12 | font-size: 11px; 13 | padding: 4px 14px; 14 | white-space: nowrap; 15 | } 16 | 17 | .menu div:hover { 18 | background-color: #316AC5; 19 | color: white; 20 | cursor: pointer; 21 | } 22 | 23 | .menu div span { 24 | float: right; 25 | } 26 | 27 | hr { 28 | margin: 2px 0; 29 | } 30 | 31 | #sabInfo { 32 | color: black; 33 | font-size: 11px; 34 | padding: 10px; 35 | } 36 | 37 | #sabInfo .label { 38 | font-weight: bold; 39 | width:140px; 40 | display:inline-block; 41 | } 42 | 43 | .status { 44 | padding: 4px; 45 | text-transform: uppercase; 46 | } 47 | 48 | .Idle { 49 | background-color: yellow; 50 | } 51 | 52 | .Paused { 53 | background-color: red; 54 | } 55 | .Paused ~ #sab-timeleft { 56 | font-weight: bold; 57 | } 58 | 59 | .Downloading { 60 | background-color: lime; 61 | } 62 | 63 | #sab-status { 64 | padding: 1px 3px; 65 | } 66 | 67 | #sab-speed { 68 | font-weight: bold; 69 | } 70 | 71 | .speed { 72 | float: right; 73 | } 74 | 75 | 76 | .file-Downloading { 77 | color: green; 78 | } 79 | 80 | .file-Paused { 81 | color: #ccc; 82 | } 83 | 84 | 85 | .float-fix { 86 | clear:both; 87 | } 88 | 89 | 90 | .progressBarContainer { 91 | width: 198px; 92 | height: 2px; 93 | background-color: #333; 94 | border: 2px solid #333; 95 | } 96 | 97 | .progressBarInner { 98 | height: 100%; 99 | background-color: lime; 100 | } 101 | 102 | 103 | 104 | ul#sab-queue { 105 | margin: 0; 106 | padding: 0; 107 | list-style: none; 108 | } 109 | 110 | ul#sab-queue li.item { 111 | margin: 5px 0; 112 | padding: 3px; 113 | border: 1px solid #fff; 114 | } 115 | 116 | .controls { 117 | float: right; 118 | } 119 | 120 | div.filename { 121 | float: left; 122 | width:160px; 123 | overflow: hidden; 124 | } 125 | 126 | .lowOpacity { 127 | opacity: 0.2; 128 | } 129 | 130 | .filename { 131 | cursor: move; 132 | } 133 | 134 | 135 | 136 | .col-left, .col-right { 137 | width:49%; 138 | float: left; 139 | line-height: 20px; 140 | } 141 | 142 | .col-right { 143 | text-align: right; 144 | } 145 | 146 | .col-container { 147 | overflow: auto; 148 | } 149 | 150 | li.highlight { 151 | background-color: #eee; 152 | border: 1px solid #ccc !important; 153 | } 154 | 155 | #graph { 156 | height: 75px; 157 | width: 220px; 158 | } 159 | 160 | #errors-container { 161 | background-color: #ffd3d3; 162 | padding: 2px 4px; 163 | border: 1px solid #ff8383; 164 | margin: 4px 0 20px 0; 165 | } 166 | 167 | #speed-input 168 | { 169 | width: 50px; 170 | } -------------------------------------------------------------------------------- /css/settings.css: -------------------------------------------------------------------------------- 1 | #connection-status 2 | { 3 | display: inline; 4 | margin-left: 30px; 5 | padding: 5px 25px; 6 | } 7 | 8 | .connection-status-success 9 | { 10 | background-color: #41AD37; 11 | } 12 | 13 | .connection-status-failure 14 | { 15 | background-color: #FF0000; 16 | } 17 | 18 | .setting.element.button 19 | { 20 | display: inline; 21 | } -------------------------------------------------------------------------------- /images/addon_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /images/content_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/content_icon.png -------------------------------------------------------------------------------- /images/content_icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/content_icon_error.png -------------------------------------------------------------------------------- /images/content_icon_fetching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/content_icon_fetching.png -------------------------------------------------------------------------------- /images/content_icon_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/content_icon_success.png -------------------------------------------------------------------------------- /images/control_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/control_cancel.png -------------------------------------------------------------------------------- /images/control_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/control_pause.png -------------------------------------------------------------------------------- /images/control_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/control_play.png -------------------------------------------------------------------------------- /images/sab_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/sab_128.png -------------------------------------------------------------------------------- /images/sab_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gboudreau/sabconnectplusplus/04b2e0c3b68de74d780ac2569066eedee36d74ad/images/sab_48.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "SABconnect++", 4 | "version": "0.6.38", 5 | "description": "SABnzbd extension for Google Chrome.", 6 | "minimum_chrome_version": "88.0", 7 | "background": { 8 | "scripts": [ 9 | "third_party/jquery/jquery-1.12.4.min.js", 10 | "third_party/jquery/jquery.urldecoder.min.js", 11 | "third_party/fancy-settings/lib/store.js", 12 | "scripts/convert.js", 13 | "scripts/utility.js", 14 | "scripts/profile.js", 15 | "scripts/pages/common.js", 16 | "scripts/pages/background.js", 17 | "scripts/pages/context_menu.js", 18 | "scripts/pages/newznab-check.js" 19 | ] 20 | }, 21 | "options_page": "settings.html", 22 | "browser_action": { 23 | "default_icon": "images/content_icon.png", 24 | "default_title": "SABconnect++", 25 | "default_popup": "popup.html" 26 | }, 27 | "icons": { 28 | "16": "images/content_icon.png", 29 | "48": "images/sab_48.png", 30 | "128": "images/sab_128.png" 31 | }, 32 | "web_accessible_resources": [ 33 | "images/content_icon.png", 34 | "images/content_icon_error.png", 35 | "images/content_icon_fetching.png", 36 | "images/content_icon_success.png", 37 | "css/common.css" 38 | ], 39 | "permissions": 40 | [ 41 | "*://*/*", 42 | "tabs", 43 | "notifications", 44 | "contextMenus", 45 | "storage" 46 | ], 47 | "content_scripts": [ 48 | { 49 | "matches": [ 50 | "*://*.nzbclub.com/*", 51 | "*://*.bintube.com/*", 52 | "*://*.binsearch.info/*", 53 | "*://*.binsearch.net/*", 54 | "*://*.binsearch.co.uk/*", 55 | "*://*.binsear.ch/*", 56 | "*://*.nzbindex.com/*", 57 | "*://*.nzbindex.nl/*", 58 | "*://*.fanzub.com/*", 59 | "*://*.animezb.com/*", 60 | "*://animenzb.com/*", 61 | "*://*.animenzb.com/*", 62 | "*://*.dognzb.cr/*", 63 | "*://*.yubse.com/*", 64 | "*://*.omgwtfnzbs.org/*", 65 | "*://*.nzb-rss.com/*", 66 | "*://*.usenet4ever.info/*" 67 | ], 68 | "js": [ 69 | "third_party/jquery/jquery-1.12.4.min.js", 70 | "scripts/content/common.js", 71 | "third_party/webtoolkit/webtoolkit.base64.js" 72 | ], 73 | "all_frames": true 74 | }, 75 | 76 | { 77 | "matches": [ "*://*.nzbclub.com/*" ], 78 | "js": [ "scripts/content/nzbclub.js" ], 79 | "all_frames": true 80 | }, 81 | { 82 | "matches": [ "*://*.bintube.com/*" ], 83 | "js": [ "scripts/content/bintube.js" ], 84 | "all_frames": true 85 | }, 86 | { 87 | "matches": [ 88 | "*://*.binsearch.info/*", 89 | "*://*.binsearch.net/*", 90 | "*://*.binsearch.co.uk/*", 91 | "*://*.binsear.ch/*" 92 | ], 93 | "js": [ "scripts/content/binsearch.js" ], 94 | "all_frames": true 95 | }, 96 | { 97 | "matches" : [ 98 | "*://*.nzbindex.com/*", 99 | "*://*.nzbindex.nl/*" 100 | ], 101 | "js": [ "scripts/content/nzbindex.js" ], 102 | "all_frames": true 103 | }, 104 | { 105 | "matches": [ "*://*.fanzub.com/*" ], 106 | "js": [ "scripts/content/fanzub.js" ], 107 | "all_frames": true 108 | }, 109 | { 110 | "matches": [ "*://*.animezb.com/*" ], 111 | "js": [ "scripts/content/animezb.js" ], 112 | "all_frames": true 113 | }, 114 | { 115 | "matches": [ 116 | "*://animenzb.com/*", 117 | "*://*.animenzb.com/*" 118 | ], 119 | "js": [ "scripts/content/animenzb.js" ], 120 | "all_frames": true 121 | }, 122 | { 123 | "matches": [ "*://*.dognzb.cr/*" ], 124 | "js": [ "scripts/content/dognzb.js" ], 125 | "all_frames": true 126 | }, 127 | { 128 | "matches": [ "*://*.yubse.com/*" ], 129 | "js": [ "scripts/content/yubse.js" ], 130 | "all_frames": true 131 | }, 132 | { 133 | "matches": [ "*://omgwtfnzbs.org/*" ], 134 | "js": [ "scripts/content/omgwtfnzbs.js" ], 135 | "all_frames": true 136 | }, 137 | { 138 | "matches": [ "*://*.nzb-rss.com/*" ], 139 | "js": [ "scripts/content/nzbrss.js" ], 140 | "all_frames": true 141 | }, 142 | { 143 | "all_frames": true, 144 | "js": [ "scripts/content/usenet4ever.js" ], 145 | "matches": [ "*://*.usenet4ever.info/*" ] 146 | } 147 | 148 | ] 149 | } 150 | -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 |SABconnect++ says: Would you like to enable one-click "Send to SAB" buttons on this site?
').append( 38 | ' Enable | Ignore' 39 | ), 40 | $('×') 41 | ) 42 | ); 43 | $('.notification.autonabSticky').notify(); 44 | $('#autonabIgnore').click(function(){ 45 | var request = { 46 | action: 'set_setting', 47 | setting: 'nabignore.' + thishost, 48 | value: true 49 | }; 50 | chrome.runtime.sendMessage( request ); 51 | $('a.close').click(); 52 | }); 53 | $('#autonabEnable').click(function(){ 54 | var request = { 55 | action: 'get_setting', 56 | setting: 'provider_newznab' 57 | }; 58 | chrome.runtime.sendMessage( request, function( response ) { 59 | var request = { 60 | action: 'set_setting', 61 | setting: 'provider_newznab', 62 | value: response.value + ', ' + thishost 63 | }; 64 | chrome.runtime.sendMessage( request, function() { 65 | location.reload(); 66 | }); 67 | }); 68 | }); 69 | } 70 | })(); 71 | -------------------------------------------------------------------------------- /scripts/pages/newznab-check.js: -------------------------------------------------------------------------------- 1 | String.prototype.trim = function(){return this.replace(/^\s+|\s+$/g, '');}; 2 | 3 | chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { 4 | if (changeInfo.status == 'complete') { 5 | var found_nab = false; 6 | var newznab_urls_pre = store.get('provider_newznab'); 7 | if (typeof newznab_urls_pre == 'undefined') 8 | return; 9 | var newznab_urls = newznab_urls_pre.split(','); 10 | var parsedurl = $.url.parse( tab.url ); 11 | var host = (parsedurl.host.match(/([^.]+)\.\w{2,3}(?:\.\w{2})?$/) || [])[0] 12 | for (var i = 0; i < newznab_urls.length; i++) { 13 | var newznab_url = newznab_urls[i].trim(); 14 | if (newznab_url.length > 0 && tab.url.match('https?://.*' + newznab_url + '.*')) { 15 | chrome.tabs.executeScript(tabId, {file: "third_party/jquery/jquery-1.12.4.min.js"}); 16 | chrome.tabs.executeScript(tabId, {file: "scripts/content/common.js"}); 17 | chrome.tabs.executeScript(tabId, {file: "third_party/webtoolkit/webtoolkit.base64.js"}); 18 | chrome.tabs.executeScript(tabId, {file: "scripts/content/newznab.js"}); 19 | chrome.tabs.insertCSS(tabId, {file: "css/newznab.css"}); 20 | if ( store.get( 'nabignore.' + host ) === false ) 21 | store.set( 'nabignore.' + host ); 22 | found_nab = true; 23 | break; 24 | } 25 | } 26 | if ( (!found_nab) && (tab.url.indexOf('http') == 0) ) { 27 | var nabenabled = store.get( 'nabignore.' + host ); 28 | var nabdetection = store.get('config_enable_automatic_detection'); 29 | if ( nabdetection && !nabenabled ) { 30 | chrome.tabs.executeScript(tabId, {file: "third_party/jquery/jquery-1.12.4.min.js"}); 31 | chrome.tabs.executeScript(tabId, {file: "third_party/jquery/jquery.notify.js"}); 32 | chrome.tabs.executeScript(tabId, {file: "scripts/content/common.js"}); 33 | chrome.tabs.executeScript(tabId, {file: "scripts/pages/newznab-autoadd.js"}); 34 | chrome.tabs.insertCSS(tabId, {file: "css/nabnotify.css"}); 35 | } 36 | if ( nabenabled === false ) 37 | store.set( 'nabignore.' + host ); 38 | } 39 | } 40 | }); 41 | -------------------------------------------------------------------------------- /scripts/pages/popup.js: -------------------------------------------------------------------------------- 1 | var store = new StoreClass('settings', {}, undefined, storeReady_popup); 2 | 3 | function storeReady_popup() { 4 | var nowtime = new Date(); 5 | var lastOpened = parseInt(getPref("lastOpened")); 6 | var closeWindow = false; 7 | if (lastOpened > 0) { 8 | if (nowtime.getTime() - lastOpened < 700) { 9 | chrome.tabs.create({url: activeProfile().url}); 10 | closeWindow = true; 11 | window.close(); 12 | } 13 | } 14 | if (!closeWindow) { 15 | setPref("lastOpened", nowtime.getTime()); 16 | SetupTogglePause(); 17 | reDrawPopup(); 18 | } 19 | 20 | $('#open_sabnzbd').click( function() { 21 | var profile = activeProfile(); 22 | var url = $.url.parse( profile.url ); 23 | 24 | var build = { 25 | protocol: url.protocol, 26 | host: url.host, 27 | port: url.port, 28 | path: url.path, 29 | } 30 | 31 | if( store.get( 'config_enable_automatic_authentication' ) ) { 32 | build.user = $.url.encode(profile.username); 33 | build.password = $.url.encode(profile.password); 34 | } 35 | 36 | chrome.tabs.create( { url: $.url.build( build ) } ); 37 | }); 38 | 39 | $('#extension_settings').click( function() { 40 | chrome.tabs.create({url: 'settings.html'}); 41 | }); 42 | 43 | $('#refresh').click( function() { 44 | refresh(); 45 | }); 46 | 47 | $('#set-speed').click( function() { 48 | setMaxSpeed( $('#speed-input').val() ); 49 | }); 50 | 51 | $('#speed-input').keydown( function( event ) { 52 | var code = event.keyCode || event.which; 53 | if( code == 13 ) { // Enter pressed 54 | setMaxSpeed( $('#speed-input').val() ); 55 | } 56 | }); 57 | 58 | populateProfileList(); 59 | 60 | $('#profiles').val( profiles.getActiveProfile().name ); 61 | $('#profiles').change( OnProfileChanged ); 62 | 63 | if (store.get('config_use_user_categories')) { 64 | $('#user_category').css("display", "block"); 65 | populateAndSetCategoryList(); 66 | } 67 | 68 | setMaxSpeedText(); 69 | } 70 | 71 | function refresh() 72 | { 73 | var background = chrome.extension.getBackgroundPage(); 74 | background.refresh(); 75 | } 76 | 77 | function setMaxSpeedText() 78 | { 79 | getMaxSpeed( function( data ) { 80 | $('#speed-input').val( data ? data.speedlimit : '' ); 81 | }); 82 | } 83 | 84 | /// @param speed Maximum speed in KBps 85 | function setMaxSpeed( speed ) 86 | { 87 | var background = chrome.extension.getBackgroundPage(); 88 | background.setMaxSpeed( speed, 89 | // Success 90 | function() { 91 | setMaxSpeedText(); 92 | }, 93 | // Failure 94 | function( XMLHttpRequest, textStatus, errorThrown ) { 95 | alert( 'Failed to set max speed.' ); 96 | } 97 | ); 98 | } 99 | 100 | function getMaxSpeed( success_callback ) 101 | { 102 | var background = chrome.extension.getBackgroundPage(); 103 | background.getMaxSpeed( success_callback ); 104 | } 105 | 106 | function moveQueueItem(nzoid, pos) 107 | { 108 | var sabApiUrl = constructApiUrl(); 109 | var data = constructApiPost(); 110 | data.mode = 'switch'; 111 | data.value = nzoid; 112 | data.value2 = pos; 113 | 114 | $.ajax({ 115 | type: "POST", 116 | url: sabApiUrl, 117 | data: data, 118 | username: activeProfile().username, 119 | password: activeProfile().password, 120 | success: function(data) { refresh() }, 121 | error: function() { 122 | $('#error').html('Failed to move item, please check your connection to SABnzbd'); 123 | } 124 | }); 125 | } 126 | 127 | function queueItemAction(action, nzoid, callback) 128 | { 129 | var sabApiUrl = constructApiUrl(); 130 | var data = constructApiPost(); 131 | data.mode = 'queue'; 132 | data.name = action; 133 | data.value = nzoid; 134 | 135 | $.ajax({ 136 | type: "POST", 137 | url: sabApiUrl, 138 | data: data, 139 | username: activeProfile().username, 140 | password: activeProfile().password, 141 | success: function(data) { refresh() }, 142 | error: function() { 143 | $('#error').html('Failed to move item, please check your connection to SABnzbd'); 144 | } 145 | }); 146 | } 147 | 148 | var paused = false; 149 | var oldPos = -1; 150 | 151 | function durationPause(e) { 152 | var val = parseInt($(this).val()); 153 | if(isNaN(val)) { 154 | val = parseInt(window.prompt("Duration (minutes)")); 155 | } 156 | if(val > 0) { 157 | togglePause(val); 158 | } else { 159 | $(this).val(0); 160 | } 161 | } 162 | 163 | function togglePause(duration) { 164 | if (paused) { 165 | var mode = 'resume'; 166 | var wasPaused = true; 167 | } else { 168 | var mode = 'pause'; 169 | var wasPaused = false; 170 | } 171 | 172 | var sabApiUrl = constructApiUrl(); 173 | var data = constructApiPost(); 174 | 175 | data.mode = mode; 176 | if(mode == "pause" && typeof duration == "number") { 177 | data.mode = "config"; 178 | data.name = "set_pause"; 179 | data.value = duration; 180 | } 181 | 182 | $.ajax({ 183 | type: "GET", 184 | url: sabApiUrl, 185 | data: data, 186 | success: function(data) { 187 | if (wasPaused) { 188 | var msg = 'Pause Queue'; 189 | } else { 190 | var msg = 'Resume Queue'; 191 | } 192 | $('#togglePause').replaceWith(buildPauseDiv(msg, !wasPaused)); 193 | 194 | refresh(); 195 | }, 196 | error: function() { 197 | $('#togglePause').html('failed - try again'); 198 | } 199 | }); 200 | } 201 | 202 | function SetupTogglePause() { 203 | paused = getPref('paused'); 204 | 205 | if (paused) { 206 | var playImg = chrome.runtime.getURL('images/control_play.png'); 207 | var img = '