Instructables AllSteps Single Page View V2

Automatically redirect to the ALL Steps page on Instructables, if not already there.

// ==UserScript==
// @name       Instructables AllSteps Single Page View V2
// @namespace  https://gf.qytechs.cn/users/2329-killerbadger
// @version    2
// @description  Automatically redirect to the ALL Steps page on Instructables, if not already there.
// @include      http://*instructables.com/id/*
// @include      https://*instructables.com/id/*
// ==/UserScript==
//Based upon New York Times Single Page View by Fat Knowledge - http://userscripts.org/scripts/show/15601
//Based upon original script: https://gf.qytechs.cn/de/scripts/1848-instructables-allsteps-single-page-view
//Based upon hint for correction https://gf.qytechs.cn/en/forum/discussion/5349/wasnt-working-until-i-changed-line-7-8-to-include-instead-of-match/p1

// Get the current window location
var curLoc = window.location.href;
// Get the html text
//var bodyText = document.body.textContent;
//Not needed for this application

// ------------------------------------------------------------------------
// Redirect to single page view if option inot already selected
// ------------------------------------------------------------------------
if (curLoc.indexOf("id") != -1 && curLoc.indexOf("ALLSTEPS") == -1) {
	if (curLoc.indexOf("?")!=-1){
		var newLoc = curLoc+'&ALLSTEPS';
	} else {
		var newLoc = curLoc+'?ALLSTEPS';
	}
	window.location.replace(newLoc);
} else {
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址