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
javascript:(function(){ | |
const MY_MASTO_LOCAL_DOMAIN = 'mastodon.social'; /* 👈 Change this value */ | |
const MY_MASTO_WEB_DOMAIN = MY_MASTO_LOCAL_DOMAIN; /* 👈 Only change this value if your Masto host is hosted an different domain than the LOCAL_DOMAIN */ | |
function tryAndGetUserName() { | |
/* Profile with a moved banner (e.g. https://mastodon.social/@bramus): follow that link */ | |
const userNewProfile = document.querySelector('.moved-account-banner .button')?.getAttribute('href'); | |
if (userNewProfile) { | |
return userNewProfile.substring(2); | |
} |
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
/* | |
* This rough script generates elm-ui attributes for autofill from the whatwg spec. | |
* | |
* Steps: | |
* | |
* 1) Go to https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill | |
* 2) Open the console | |
* 3) Run the following code | |
* 4) Copy the printed string and paste it after the "on" binding in UI/TextBox/Autofill.elm | |
* 5) Remove the module declaration at the top |
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 fs = require('fs'); | |
module.exports = function() { | |
let fileContent = fs.readFileSync('./platforms/android/build.gradle').toString(); | |
if (!/(classpath "com.google.gms:google-services:.*")/.test(fileContent)) { | |
fileContent = fileContent.replace(/(classpath "com.android.tools.build:gradle:.*")/, | |
'$1\n\t\tclasspath "com.google.gms:google-services:3.0.0"'); | |
} |