wang867gmail.com / rakuten tw 18 pass

// ==UserScript==
// @name           rakuten tw 18 pass
// @namespace      
// @include        https://www.rakuten.com.tw/shop/*
// @description    pass rakuten tw 18+ page
// @version        2.2
// @grant       none
// ==/UserScript==

var pattern_title = /分級制度/;
var pattern_href = /ac=yes/;
var title = document.title;
var links = document.getElementsByTagName('a');
if (title.match(pattern_title)) {
  for (x in links) {
    if (links[x].href.match(pattern_href)) {
      window.location.href = links[x].href;
      break
    }
  }
}