Last active
August 29, 2015 14:13
-
-
Save gonter/d40829048d83910a5e60 to your computer and use it in GitHub Desktop.
replace iframe link with https version
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
// ==UserScript== | |
// @name rdsiframe | |
// @namespace urxn.at | |
// @description force https iframe | |
// @include //www.research-data-survey.at/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var re_http= new RegExp("^http:"); | |
var node_list = document.getElementsByTagName('iframe'); | |
for (var i = 0, j = node_list.length; i < j; i++) | |
{ | |
var node = node_list[i]; | |
var src= node.getAttribute('src'); | |
if (src.match(re_http)) | |
{ | |
var new_src= src.replace('http:', 'https:') | |
node.setAttribute('src', new_src); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment