ylns1314 / bcy.net open ALL

// ==UserScript==
// @name         bcy.net open ALL
// @namespace    http://bbstripe.me/
// @version      0.3
// @description  You know what this script will do right.
// @author       BYBYB
// @include      /^https?:\/\/(www\.)?bcy.net\/coser\/detail\/.*$/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.getElementsByClassName("container")[0].setAttribute("data-forbidden-right-click","");
    var imgs = document.getElementsByClassName("detail_clickable");
    var btnOpenAll = document.createElement("BUTTON");
    var divBtnOpenAll = document.createElement("DIV");
    var t = document.createTextNode("Open all pictures in new tabs");
    btnOpenAll.setAttribute("class","_btn _btn--green _btn--sm _btn--icon");
    btnOpenAll.appendChild(t);
    divBtnOpenAll.setAttribute("class","declaration fz14 mt30");
    divBtnOpenAll.appendChild(btnOpenAll);
    document.getElementsByClassName("mt50")[0].appendChild(divBtnOpenAll);
    btnOpenAll.onclick = function(){
            for(var i = 0;i < imgs.length;i++) {
                window.open(imgs[i].src.replace(/\/w[0-9]{1,3}/g,""));
    }
    };

})();