This file contains hidden or 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
const modifier = async () => { | |
const sleep = msec => new Promise(resolve => { | |
if (document.readyState === 'complete') { | |
setTimeout(resolve, msec); | |
} else { | |
document.addEventListener('readystatechange', () => { | |
if (document.readyState === 'complete') { | |
setTimeout(resolve, msec); | |
} | |
}, { capture: false, passive: true }); |
This file contains hidden or 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
window.addEventListener('load', function() { | |
const names = [ 'blur' ];//[ 'blur', 'pagehide', 'unload', 'beforeunload' ]; | |
for (const v of names) { | |
window.addEventListener(v, function(event) { // ignored this warning | |
if (window.Game.setting.sound_flag != 0) { | |
event.stopImmediatePropagation(); | |
} | |
}, true) | |
} | |
}) |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
namespace vkatsu { | |
public class VKCrypto | |
{ | |
public static RijndaelManaged Rijndael { get; private set; } | |
public int MaxBufferSize { get; set; } = 4*1024; |
This file contains hidden or 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
# https://blogs.msdn.microsoft.com/commandline/2017/08/02/updating-the-windows-console-colors/ | |
# Redが死ぬほど見づらい,Blueもちょっと微妙なので変更 | |
ForegroundColour = 208, 208, 208 | |
BackgroundColour = 28, 28, 28 | |
CursorColour = 255, 175, 0 | |
IMECursorColour = 128, 224, 160 | |
Black = 12, 12, 12 | |
BoldBlack = 118, 118, 118 | |
Red = 249, 38, 114 #197, 15, 31 | |
BoldRed = 255, 89, 149 #231, 72, 86 |
This file contains hidden or 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
#include <fstream> | |
#include <memory> | |
#include <string> | |
#include <tuple> | |
#ifndef WIN32_LEAN_AND_MEAN | |
#define WIN32_LEAN_AND_MEAN | |
#endif | |
#ifndef NOMINMAX | |
#define NOMINMAX | |
#endif |
This file contains hidden or 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
*::before { | |
border-color: transparent; | |
} | |
.pop-usual::before, [class^=cnt-]::before, [class^=prt-]::before, [class^=lis-]::before, [id^=prt-]::before { | |
border-style: solid; | |
border-width: 0; | |
} |
This file contains hidden or 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
template <typename T> | |
std::deque<T> expand_ranges(const std::string& src, size_t limit) | |
{ | |
std::deque<T> r; | |
// 現状の parseStringToでは結局分割した std::stringが必要なので先に splitでバラしておく | |
auto a = split(src, ','); | |
for (auto it = a.cbegin(); ((it != a.cend()) && (r.size() <= limit)); ++it) { | |
T v1; | |
if (parseStringTo<T>(v1, *it) == it->size()) { |
This file contains hidden or 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
#include <SDKDDKVer.h> | |
#include <Windows.h> | |
#include <wincodec.h> | |
#include <comdef.h> | |
#include <wrl.h> | |
HRESULT test() | |
{ | |
HRESULT hr; |
This file contains hidden or 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
(function() { | |
chrome.runtime.onInstalled.addListener(function () { | |
var rule3 = { | |
priority: 110, | |
conditions: [ | |
new chrome.declarativeWebRequest.RequestMatcher({ | |
url: { | |
hostEquals: 'pbs.twimg.com', | |
pathContains: '/media/', | |
queryContains: 'name=' |
This file contains hidden or 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
(function (_window) { | |
chrome.runtime.onConnect.addListener(function (port) { | |
if (port.name == "registerFilters") { | |
chrome.webRequest.onBeforeRequest.addListener(function (details) { | |
if (port && details.requestBody) { | |
port.postMessage({ url: details.url, data: details.requestBody.formData }); | |
} | |
}, { urls: [ "http://*/kcsapi/api_req_hensei/change" ] }, [ "blocking", "requestBody" ]); | |
port.onDisconnect.addListener(function () { | |
// TODO: onBeforeRequest.removeListenerやっておいたほうが無駄に listener残らなくていいかも |
NewerOlder