Skip to content

Instantly share code, notes, and snippets.

@reinhart1010
Created August 12, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinhart1010/8b978745806da07979947d8d6eaa0008 to your computer and use it in GitHub Desktop.
Save reinhart1010/8b978745806da07979947d8d6eaa0008 to your computer and use it in GitHub Desktop.
Replacing Princesses with Jailbreaks
// Princess2Jailbreak.js
// Because Jailbreak is... (Spoiler Alert!)
// Copyright (c) Reinhart Previano K.
// Code licensed under MIT License
// Requires UTF+8 Encoding to be set
// This script will NOT Jailbreak your iOS device (iPhone, iPad, iPod Touch).
// Instead, this is a reference to The Emoji Movie by Sony Pictures Animation.
// Want a more geeky reference?
// This Source Code will be uploaded to Dropbox!!!
// Call hackPrincess() only ONCE, unless the result will be repeated.
function hackPrincess() {
// Call HTML tag with id="hack" attribute
var str = document.getElementById("hack").innerHTML;
// Replace all Princess-related words to Jailbreaks (Princess emoji is converted to Pirate Flag, while skin modifiers are not removed)
var hack = str.replace(/princess/i, "Jailbreaker").replace(/princessed/i, "Jailbroken").replace(/princesses/i, "Jailbreakers").replace(/princessing/i, "Jailbreaking").replace(/👸/gi,"🏴‍☠️")
document.getElementById("hack").innerHTML = hack;
console.log("MEH!");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment