in Education by
I'm wanting to make a bookmarklet that would change a webpage from http://user.tumblr.com/post/123456789 to http://user.tumblr.com/liked/by/user with just a click. I'm usually alright at frankensteining code together, and I've been looking at the Tumblr manual reblog button that uses "window.location" along with Bookmarklet to edit current URL and Replace end characters of current URL with bookmarklet I can't see anything useable that would extract a subdomain into a variable and then place it in a new URL. I did stumble across this code: ^http://([^.]+)\.domain\.com But I have no idea what that means or how to use it. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Not sure if this is what your looking for, but I use as I have multiple instances of my site and what bookmarks to keep me in the same instance regardless of port or protocol. New Tab javascript:(function(){window.open(location.protocol+'//'+location.hostname+':'+location.port+'/liked/by/user')})(); Current Tab javascript:(function(){window.location.assign(location.protocol+'//'+location.hostname+':'+location.port+'/liked/by/user')})(); EDIT: Forgot to put code blocks

Related questions

0 votes
    I'm trying to figure out a solution to allow an website to know what URL the user is on through ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    The _____tools help you to select a portion of an image that is to be edited. Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    At θ=π/2, positive portion is __________ negative portion in power cycle. (a) greater than (b) less than (c) ... for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 19, 2021 in Education by JackTerrance
0 votes
    A window into a portion of a database is (a) Schema (b) View (c) Query (d) Data dictionary The ... and Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Which character function can be used to return a specified portion of a character string? (a) INSTR ... Transaction Model topic in chapter Transactions of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    NiFi provides DFMs to pick a portion of the dataflow (or the entire dataflow) and build a ____________. (1)Controller Service (2)Funnel (3)Template (4)All the options...
asked Apr 20, 2021 in Technology by JackTerrance
0 votes
    NiFi provides DFMs to pick a portion of the dataflow (or the entire dataflow) and build a ____________. (1)Controller Service (2)Funnel (3)Template (4)All the options...
asked Apr 19, 2021 in Technology by JackTerrance
0 votes
    How can you determine the size of an allocated portion of memory?...
asked Jan 23, 2021 in Technology by JackTerrance
0 votes
    In modern software development, a large portion of code is reused from open source and third-party libraries. False True...
asked Oct 28, 2020 in Technology by JackTerrance
0 votes
    To add a new element to a list we use which Python command? a) list1.addEnd(5) b) list1.addLast(5) c) list1.append(5) d) list1.add(5)...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    In my Mongo Helm Chart, I am using PVC for Persistence volume. I am using the chart to install ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
...