├── LICENSE ├── README.md ├── gm-i-am-over-18.user.js ├── icon48.png └── icon64.png /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 I-Ta Tsai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gm-i-am-over-18 2 | 3 | ![icon](https://github.com/tsaiid/gm-i-am-over-18/raw/master/icon48.png) 4 | 5 | A greasemonkey script to automatically hide the "I'm over 18" declaration. 6 | 7 | This script can be installed on OpenUserJS: https://openuserjs.org/scripts/tsaiid/I_am_over_18 8 | 9 | MIT License 10 | -------------------------------------------------------------------------------- /gm-i-am-over-18.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name I am over 18 3 | // @author tsaiid 4 | // @namespace http://tsai.it/project/gmscripts/i-am-over-18/ 5 | // @homepageURL https://github.com/tsaiid/gm-i-am-over-18 6 | // @run-at document-idle 7 | // @version 0.2.20200218 8 | // @description Automatically agrees the "I'm over 18" declaration. The current supported sites are primarily in Taiwan. 9 | // @icon https://raw.githubusercontent.com/tsaiid/gm-i-am-over-18/master/icon48.png 10 | // @icon64 https://raw.githubusercontent.com/tsaiid/gm-i-am-over-18/master/icon64.png 11 | // @license MIT 12 | // @copyright 2016, I-Ta Tsai (http://tsai.it/) 13 | 14 | // @match *://*.ettoday.net/* 15 | // @match *://*.eyny.com/* 16 | // @match *://ck101.com/* 17 | // @match *://www.xvideos.com/* 18 | // @match *://*.blogspot.com/* 19 | // @match *://t66y.com/ 20 | // @match *://www.jkforum.net/* 21 | // @match http://*.playno1.com/* 22 | // @match http://av.movie/* 23 | // @match http://katproxy.com/* 24 | // @match http://kickass.socialtorrent.net/* 25 | // @match http://www.ibeauty.tw/* 26 | // @match http://www.appledaily.com.tw/* 27 | // @match http://www.getchu.com/php/attestation.html* 28 | // @match http://www.storm.mg/* 29 | // @match https://*.fc2.com/* 30 | // @match https://news.gamme.com.tw/* 31 | // @match https://r18.clickme.net/* 32 | // @match https://v.jav101.com/* 33 | // @match https://www.dcard.tw/* 34 | // @match https://www.kocpc.com.tw/* 35 | // @match https://www.myfreecams.com/* 36 | // @match https://www.ptt.cc/* 37 | // @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js 38 | // @require https://gist.githubusercontent.com/BrockA/2625891/raw/waitForKeyElements.js 39 | // @grant none 40 | // ==/UserScript== 41 | 42 | (() => { 43 | this.$ = this.jQuery = jQuery.noConflict(true); 44 | 45 | 46 | const url = window.location.href; 47 | 48 | function clickToContinue(jNodes) { 49 | /* 50 | console.log(jNodes); 51 | console.log(jNodes.context); 52 | console.log(jNodes.selector); 53 | */ 54 | jNodes[0].click(); 55 | } 56 | 57 | // appledaily 58 | if (url.includes("www.appledaily.com.tw")) { 59 | waitForKeyElements( 60 | "#popup_18 a.yes", 61 | clickToContinue 62 | ); 63 | } 64 | //av.movie 65 | else if (url.includes("av.movie/")){ 66 | waitForKeyElements( 67 | 'button#warning-yes', 68 | clickToContinue 69 | ); 70 | } 71 | // blogspot 72 | // from https://gist.github.com/obeattie/362589 73 | else if (url.includes('.blogspot.')) { 74 | const overlay = document.getElementById('injected-iframe'); 75 | if (overlay) { 76 | const nextSibling = overlay.nextElementSibling; 77 | if (nextSibling.tagName == 'STYLE') nextSibling.parentElement.removeChild(nextSibling); 78 | overlay.parentElement.removeChild(overlay); 79 | } 80 | } 81 | // for ck101 82 | else if (url.includes("ck101.com")) { 83 | document.getElementById('periodaggre18_2015').checked = true; 84 | document.getElementById('fwin_dialog_submit').click(); 85 | } 86 | // clickme.net 87 | else if (url.includes("r18.clickme.net")) { 88 | $('button:contains("已滿18歲 進入")').click(); 89 | } 90 | // dcard 91 | // 92 | else if (url.includes("www.dcard.tw/")) { 93 | waitForKeyElements( 94 | 'button:contains("是,我已滿十八歲。")', 95 | clickToContinue 96 | ); 97 | } 98 | // for ettoday 99 | else if (url.includes(".ettoday.net")) { 100 | document.querySelector('a.enter').click(); 101 | } 102 | // for eyny 103 | else if (url.includes(".eyny.com")) { 104 | document.querySelector("input[value^='是,我已年滿18歲。']").click(); 105 | } 106 | // 是(進入) 107 | else if (url.includes(".fc2.com")) { 108 | const a = document.querySelector("a.c-btn-102") || document.getElementById("age_ok_btn"); 109 | a.click(); 110 | } 111 | //news.gamme 112 | else if (url.includes("news.gamme.com.tw/")){ 113 | document.getElementById('adult_notagain').checked = true; 114 | MemberUI.r18WarningClose(); 115 | } 116 | // getchu.com 117 | else if (url.includes("www.getchu.com/")) { 118 | $('a:contains("[は い]")')[0].click(); 119 | } 120 | // ibeauty 121 | else if (url.includes("www.ibeauty.tw")) { 122 | waitForKeyElements( 123 | ".warningWp .warningBtn .btnYes", 124 | clickToContinue 125 | ); 126 | } 127 | // for jav101 128 | else if (url.includes("v.jav101.com")) { 129 | document.querySelector("a.agreeBtn").click(); 130 | } 131 | // jkforum 132 | else if (url.includes("www.jkforum.net/")){ 133 | waitForKeyElements( 134 | 'button#fwin_dialog_submit', 135 | clickToContinue 136 | ); 137 | } 138 | 139 | // for kickass 140 | else if (url.includes("kickass.socialtorrent.net") || url.includes("katproxy.com")) { 141 | $('button:contains("Yes, let me see it")').click(); 142 | } 143 | 144 | // www.kocpc.com.tw 145 | else if (url.includes("www.kocpc.com.tw")) { 146 | waitForKeyElements( 147 | "button.ox18B", 148 | clickToContinue 149 | ); 150 | } 151 | 152 | // myfreecams 153 | else if (url.includes("www.myfreecams.com")) { 154 | waitForKeyElements( 155 | "#enter_desktop", 156 | clickToContinue 157 | ); 158 | } 159 | 160 | // for playno1 161 | else if (url.includes(".playno1.com")) { 162 | waitForKeyElements( 163 | 'button:contains("我已滿18歲 進入")', 164 | clickToContinue 165 | ); 166 | } 167 | 168 | // for ptt 169 | else if (url.includes("www.ptt.cc")) { 170 | $('button:contains("我同意,我已年滿十八歲")').click(); 171 | } 172 | 173 | // storm.mg 174 | else if (url.includes("www.storm.mg")) { 175 | waitForKeyElements( 176 | "button.button18x.yes", 177 | clickToContinue 178 | ); 179 | } 180 | // t66y.com 181 | else if (url.includes("t66y.com")) { 182 | waitForKeyElements( 183 | 'a:contains("滿 18 歲,")', 184 | clickToContinue 185 | ); 186 | } 187 | 188 | // for xvideos 189 | else if (url.includes(".xvideos.com")) { 190 | document.getElementById('disclaimer_background').click(); 191 | } 192 | })(); 193 | -------------------------------------------------------------------------------- /icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsaiid/gm-i-am-over-18/649a6dcc935863b83e7b54ee256e36660930908d/icon48.png -------------------------------------------------------------------------------- /icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsaiid/gm-i-am-over-18/649a6dcc935863b83e7b54ee256e36660930908d/icon64.png --------------------------------------------------------------------------------