This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter fix | |
// @version 1.0 | |
// @description Fix twitter link | |
// @author apple502j | |
// @match https://qiita.com/advent-calendar/* | |
// ==/UserScript== | |
window.addEventListener("load", function(){ | |
for (const item of document.querySelectorAll("a.twitter-share-button")) item.href += "?url=" + item.dataset.url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
import re | |
import mw_api_client as mw | |
ja=mw.Wiki("https://ja.scratch-wiki.info/w/api.php","ExtLinker by Apple502j") | |
ja.login("username","password") | |
summary="Scratchリンクの内部リンク化 (Bot)" | |
l=ja.exturlusage( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from urllib.parse import unquote | |
import re | |
import mw_api_client as mwc | |
try: | |
with open(".lastpage-iw", "r", encoding="utf-8") as f: | |
lastpage = f.read() | |
except OSError: | |
lastpage = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mw.loader.load("https://ja.scratch-wiki.info/w/load.php?debug=false&lang=ja&modules=ext.inputBox.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%7Cskins.scratchwikiskin2&only=styles&skin=scratchwikiskin2", "text/css") | |
$("#firstHeading")[0].innerText=document.title="なんでも検索"; | |
$("#mw-content-text")[0].innerHTML=`<div class="mw-inputbox-centered"> | |
<input class="mw-inputbox-input mw-ui-input mw-ui-input-inline" type="text" placeholder="検索ワードを入力" value="" id="keyword" size="50"><br> | |
<input type="button" class="mw-ui-button mw-ui-progressive" value="なんでも検索!" id="btn"> | |
</div> | |
<div class="search-results"></div> | |
`; | |
document.getElementById("btn").addEventListener("click", () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ToC | |
Coroutines | |
What is a coroutine? | |
Where can I use await? | |
What does “blocking” mean? | |
Discord: NEW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All Discord emojis | |
UNICODE_EMOJI_REGEX = r'[\u00a9\u00ae\u2122\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23e9-\u23f3\u23f8-\u23fa\u24c2\u25b6\u25c0\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u261d\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u265f\u2660\u2663\u2665\u2666\u2668\u267b\u267e\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26ce\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f7-\u26fa\u26fd]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let username = ''; | |
const leaveStudioConstructor = (studioId, elem) => (e => { | |
e.preventDefault(); | |
e.stopPropagation(); | |
if (!username) return; | |
$.ajax({type: 'PUT', url: `https://scratch.mit.edu/site-api/users/curators-in/${studioId}/remove/?usernames=${username}`}); | |
}); | |
const getStudioIdFromMediaItemContent = mediaItemContent => mediaItemContent.children[0].children[0].href.match(/\d+/g)[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two questions; 1) do you think cloud data is "useful"? Previously there was more freedom about what we can do with cloud data, like sharing pixel arts or platformer levels - and most are now harder to make because of new rules about cloud data usage. I know it's hard to moderate, but there are some interesting movements that are going totally opposite - user-created websites. Recently they got rid of the registration part (which is great because lots of Japanese people there couldn't... | |
...understand it.) While the restrictions for the website are still the same, I feel like they are doing what you do with the cloud data. (Or is that just because Paddle was tired of checking all websites?) Also, links to websites that are for creative purpose (like YouTube) are allowed - despite not being as moderated as Scratch is. And what's the difference? Is it because it's an external website? I can understand that you need to moderate, but "providing another means for people to... | |
...communicate" is a strong phrase th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Don't Load Project | |
// @description Do not load project when reading comments | |
// @author apple502j | |
// @match https://scratch.mit.edu/projects/* | |
// ==/UserScript== | |
// Credit to Florrie | |
const destroyGUI = () => { | |
const oldMap = Array.prototype.map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Scratch3FaceSensingBlocks { | |
constructor (runtime) { | |
/** | |
* The runtime instantiating this block package. | |
* @type {Runtime} | |
*/ | |
this.runtime = runtime; | |
this.runtime.emit('EXTENSION_DATA_LOADING', true); | |
Blazeface.load().then(model => { | |
this.blazeface = model; |