Created
September 7, 2018 17:23
-
-
Save scottymac/ddafcf9deef562998a05663e37442a12 to your computer and use it in GitHub Desktop.
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
var current_url = window.location.href; | |
var feedbin_url = "https://feedbin.me/?subscribe=" | |
var inst_regex = new RegExp("https:\/\/www\.instagram\.com\/(.*)\/"); | |
var inst_username = inst_regex.exec(current_url)[1]; | |
if (inst_username !== "" || inst_username !== undefined) { | |
var feed_url = "https://rsshub.app/instagram/user/" + inst_username; | |
window.location = feedbin_url + feed_url; | |
} | |
// The bookmarklet | |
javascript:%20(function%20()%20{var%20current_url=window.location.href,feedbin_url="https://feedbin.me/?subscribe=%22,inst_regex=new%20RegExp(%22https://www.instagram.com/(.*)/%22),inst_username=inst_regex.exec(current_url)[1];if(%22%22!==inst_username||void%200!==inst_username){var%20feed_url=%22https://rsshub.app/instagram/user/%22+inst_username;window.location=feedbin_url+feed_url}}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment