Skip to content

Instantly share code, notes, and snippets.

@slightair
slightair / gazoreply.user.js
Created December 4, 2013 05:57
replace gazoreply.jp copy image url
// ==UserScript==
// @name http://gazoreply.jp/
// @description replace gazoreply.jp copy image url
// @include http://gazoreply.jp/*
// @exclude http://gazoreply.jp/situation/*
// ==/UserScript==
window.addEventListener('load', function(){
var imgURL = document.getElementById("main-photo-img").getAttribute('src');
var clipboardButtonElement = document.getElementById("copy-clipboard-btn");
after :each do
$times ||= 0
$times += 1
if example.exception
desc = example.metadata[:full_description].split.join("_").gsub(/\//, "_")
page.driver.render("./tmp/out-#{'%03d' % $times}-#{desc}-#{$$}.png")
end
end