Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Abema 区域限制
// @version 1.0.0
// @run-at document-end
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
Object.defineProperty(__CLIENT_REGION__, 'isAllowed', {
get: () => true
@jie-meng
jie-meng / BankCardNumberEditText.java
Last active October 29, 2021 05:21
Android EditText with space every 4 characters
//Util methods
public static void editTextSetContentMemorizeSelection(EditText editText, CharSequence charSequence) {
int selectionStart = editText.getSelectionStart();
int selectionEnd = editText.getSelectionEnd();
editText.setText(charSequence.toString());
if (selectionStart > charSequence.toString().length()) {
selectionStart = charSequence.toString().length();
}
if (selectionStart < 0) {