以下でjsを実行
https://chrome.google.com/webstore/detail/scriptautorunner/gpgjofmpmjjopcogjgdldidobhmjmdbm?hl=ja
- page inclement
URL: image.slidesharecdn.com
document.onkeydown = function(e) {
const remove_regex = /\?cb=[0-9]+/i;
const url = location.href.replace(remove_regex, '');
const regex = /(.+-)([0-9]+)(-[0-9]+\.jpg)$/i;
const page_num = Number(url.replace(regex, '$2'));
const pre_url = url.replace(regex, '$1');
const suf_url = url.replace(regex, '$3');
switch (e.keyCode) {
case 37:
if(page_num > 1) {
const next_page_num = page_num - 1;
window.location.href = pre_url + next_page_num + suf_url;
}
break;
case 39:
const next_page_num = page_num + 1;
window.location.href = pre_url + next_page_num + suf_url;
break;
}
};
- page を開く
URL: slideshare.net
document.onkeydown = function(e) {
const txt = document.documentElement.innerHTML;
const regex = /https:\/\/image\.slidesharecdn\.com\/[^ ]+\/[^ ]*[0-9]*-1-[456789][0-9]+\.jpg\?cb=[0-9]+/i;
const url = txt.match(regex);
switch (e.keyCode) {
case 13:
if(url.length > 0)
{
window.open(url[0], '_blank');
}
break;
}
};