Skip to content

Instantly share code, notes, and snippets.

@mamemomonga
Last active July 2, 2023 02:54
Show Gist options
  • Save mamemomonga/7ec40576bfcd030c73804c64e80a9116 to your computer and use it in GitHub Desktop.
Save mamemomonga/7ec40576bfcd030c73804c64e80a9116 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name タイッツー拡張_ポストのコピペをしやすく
// @namespace https://gist.github.com/mamemomonga/7ec40576bfcd030c73804c64e80a9116
// @version 0.1.0
// @description ポスト詳細のリンクをアイコンに移動し、ポスト内容のコピペをやりやすくする。
// @author mamemomonga
// @match https://taittsuu.com/home
// @match https://taittsuu.com/users/*
// @icon https://taittsuu.com/image/sozai/taitsu.png
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js
// ==/UserScript==
(function() {
'use strict';
function TaittsuuExCopipe() {}
TaittsuuExCopipe.prototype={
start: function() {
const t=this
t.runFilter()
},
log: function(m) {
console.log(m)
},
filter: function(e) {
const icon=$(e).find(".post-image").parent()
const link=$(e).find(".post-link-post")
icon.attr("href",link.attr("href"))
icon.attr("target","")
link.removeAttr("href")
},
runFilter: function() {
const t=this
return new Promise((resolve)=>{
let plt;
const hf=()=>{
const po=$("#posts .post-wrap")
if(po.length > 0) {
clearInterval(plt)
po.each((_,e)=>{
t.filter(e)
})
resolve(posts)
}
}
plt=setInterval(hf,10)
})
}
}
new TaittsuuExCopipe().start()
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment