Site switcher bookmarklet
How do I make an site switcher bookmarklet?
A bookmarklet that alternately opens the same page on two sites.. What is a site switcher bookmarklet? How do you make a site switcher bookmarklet? This script and codes were developed by Scott Bram on 11 August 2022, Thursday.
Site switcher bookmarklet - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Site switcher bookmarklet</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import "compass/css3"; </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <a title="site1/site2 switch" href="javascript:(function(){var url = location.href;var path = location.pathname;var site1 = 'http://site.one';var site2 = 'http://site.two';var baseURL = url.substring(0, url.indexOf('/', 14));if(baseURL == site1){window.open(site2+path,'_self',false);}else if(baseURL == site2){window.open(site1+path,'_self',false);}else{alert('Not '+site1+' or '+site2+'.');};})();">site1/site2 switch</a> <-- drag this link to your bookmark bar
<br /><br />
Now go to a page deep in site1 or site2<br />
and click the bookmark to see the magic happen.
<br /><br />
<a href="http://memegenerator.net/instance/29014236" target="_blank"><img src="http://cdn.memegenerator.net/instances/400x/29014236.jpg" border="0"/></a> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Site switcher bookmarklet - Script Codes CSS Codes
@import "compass/css3";
Developer | Scott Bram |
Username | thatbram |
Uploaded | August 11, 2022 |
Rating | 3 |
Size | 2,115 Kb |
Views | 56,672 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Strip ASCII characters that break JSON parsing | 3,100 Kb |
Trail detail example | 2,361 Kb |
Event demo | 2,104 Kb |
HTML5 File API demo | 3,316 Kb |
Uber vs Cab | 2,116 Kb |
WindowSizr | 3,447 Kb |
Squareple | 3,232 Kb |
AOR site logo | 2,527 Kb |
Idea for Colorectal Cancer Awareness Month promo for developers | 1,803 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
Collapsing Widget | Er40 | 4,279 Kb |
A Pen by Stan Williams | Stanssongs | 6,706 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Automatic scroll | Skeurentjes | 4,042 Kb |
Blackberry Mock | Zacharyolson | 1,865 Kb |
Webkit decolorize | Fivera | 1,675 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
Scroll effect with text with help from Skrollr | Luxonglassing | 2,935 Kb |
Segments mouse following | Nosir | 2,909 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!