Chaturbate exhibitionists - show only women (shemale / couple) online

Filter gender on the amateur site: http://chaturbate.com/exhibitionist-cams

  1. // ==UserScript==
  2. // @name Chaturbate exhibitionists - show only women (shemale / couple) online
  3. // @namespace https://greasyfork.org/users/5174-jesuis-parapluie
  4. //
  5. // @description Filter gender on the amateur site: http://chaturbate.com/exhibitionist-cams
  6. //
  7. // @include /^https?://(.+\.)?chaturbate\.com/exhibitionist-cams/?.*$/
  8. //
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
  10. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js
  11. //
  12. // @grant none
  13. //
  14. // @version 0.1.4
  15. // ==/UserScript==
  16.  
  17. /**
  18. * The JQuery Cookie plugin is only used to disable the terms and conditions overlay.
  19. **/
  20.  
  21. (function ($) {
  22. "use strict";
  23. /*jslint browser: true */
  24. /*global $, jQuery */
  25.  
  26. var options = {
  27. startFilter: 'f', /* f, c, s, fc, fcs */
  28. autoLogin: { active: false, username: '', password: '' }
  29. },
  30.  
  31.  
  32. filter = function (e) {
  33. var i, len, cam, act;
  34. if (e === "update") {
  35. act = $('#main > div.top-section > ul > li.active').find('a').attr('href');
  36. if (act && act[0] === '#') { cam = act.substr(1); }
  37. } else {
  38. $('#main > div.top-section > ul > li').removeClass('active');
  39. $(this).addClass('active');
  40. cam = $(this).find('a').attr('href').substr(1);
  41. }
  42.  
  43. if (cam !== null && cam !== 'all') {
  44. $('#main > div.content > div.c-1.endless_page_template > ul.list > li').hide();
  45.  
  46. for (i = 0, len = cam.length; i < len; i += 1) {
  47. $('#main > div.content > div.c-1.endless_page_template > ul.list > li span.gender' + cam[i]).parent().parent().parent().show();
  48. }
  49.  
  50. } else {
  51. $('#main > div.content > div.c-1.endless_page_template > ul.list > li').show();
  52. }
  53. };
  54.  
  55.  
  56. $(function () {
  57. var setting = window.location.href.split("#"),
  58. gender = 'all';
  59.  
  60. $('#entrance_terms:visible, #overlay:visible').hide();
  61. if ($.cookie('agreeterms') !== '1') { $.cookie('agreeterms', '1', {expires: 365, path: '/'}); }
  62.  
  63. $('#main > div.top-section > ul').prepend($('<br><br>'));
  64. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#all">All</a>' }).click(filter));
  65. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#fcs">Female+Couple+Shemale</a>' }).click(filter));
  66. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#fc">Female+Couple</a>' }).click(filter));
  67. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#m">Male</a>' }).click(filter));
  68. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#s">Shemale</a>' }).click(filter));
  69. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#c">Couple</a>' }).click(filter));
  70. $('#main > div.top-section > ul').prepend($('<li>', { html: '<a href="#f">Female</a>' }).click(filter));
  71.  
  72. document.addEventListener("DOMNodeInserted", function (event) {
  73. if (event.target.nodeName === 'UL' && $(event.path[0]).hasClass('list')) { filter('update'); }
  74. });
  75.  
  76. if (options !== undefined && options.autoLogin !== undefined && options.autoLogin.active === true && options.autoLogin.password !== '' && options.autoLogin.username !== '' && $('a[href$="auth/login/"]').size() > 0) {
  77. $('#login-box').find('form input[type="password"]').attr('value', options.autoLogin.password);
  78. $('#login-box').find('form input[name="username"]').attr('value', options.autoLogin.username);
  79. $('#login-box').find('form input[type="submit"]').click();
  80. }
  81.  
  82. if (setting && setting.length > 1) {
  83. $('#main > div.top-section > ul > li > a[href="#' + setting[1] + '"]').click();
  84. } else {
  85. if (options !== undefined && options.startFilter !== undefined && options.startFilter !== '') { gender = options.startFilter; }
  86. $('div.top-section a[href="#' + gender + '"]').parent().addClass('active');
  87. $('#main > div.top-section > ul > li > a[href="#' + gender + '"]').click();
  88. }
  89. });
  90.  
  91.  
  92. }(jQuery));
  93.