Comments (5)
This is due to the Summer 2015 release which now blocks css, javascript, etc. from components.
((Read about changes to home page component restrictions and Visual Force Areas here.))
I was able to get it to work with the following hack
-
Install the package
-
Configure the home default layout so that the ip range component is ordered as the last component showing in the layout
-
In Chrome browser, open DevTools and go to the javascript console
-
Paste the contents of the google doc (link below) into the console and hit [ENTER], you will see the buttons appear where they should have been if the JS wasn't blocked:
var startingPoint = 0;
var IP_MAX = 255;
function loadIframes() {
var a = startingPoint;
var docHTML = "<table class=\"list\" cellspacing=\"0\" border=\"0\" cellpadding=\"4\">";
docHTML += "<tr class=\"headerRow\">";
docHTML += "<th>IP Start</th>";
docHTML += "<th>IP End</th>";
docHTML += "<th>Status</th>";
docHTML += "<th>(iframe loads here)</th>";
docHTML += "</tr>";
while (a<=IP_MAX) {
docHTML += "<tr>";
docHTML += "<td>"+a+".0.0.0</td>";
docHTML += "<td>"+(a+1)+".255.255.255</td>";
docHTML += "<td id=\"iframe"+a+"_Updated\">Loading...</td>";
docHTML += "<td><iframe onload=\"parent.document.getElementById(this.name+'_Updated').innerHTML = 'iframe Loaded.';\" id=\"iframe"+a+"\" name=\"iframe"+a+"\" src=\"/05G/e?retURL=%2F05G&IpStartAddress="+a+".0.0.0&IpEndAddress="+(a+1)+".255.255.255&save=1\" width=\"0\" height=\"0\" frameborder=\"0\"></iframe></td>";
docHTML += "</tr>";
a = a+2;
}
docHTML += "</table>";
document.getElementById("output").innerHTML = docHTML;
}
function saveIPs() {
saveIP(startingPoint);
}
function saveIP(ip) {
var frame = document.getElementById("iframe"+ip);
document.getElementById('iframe'+ip+'_Updated').innerHTML = "Saving IP Range...";
var insideFrame = frame.contentWindow;
var confirmationKeyElement = insideFrame.document.getElementById("_CONFIRMATIONTOKEN");
if (confirmationKeyElement != null) {
frame.onload="";
var confirmationKey = confirmationKeyElement.value;
insideFrame.document.location.href = insideFrame.document.location.href+"&_CONFIRMATIONTOKEN="+confirmationKey;
document.getElementById("iframe"+ip+"_Updated").innerHTML = 'Completed.';
} else {
document.getElementById("iframe"+ip+"_Updated").innerHTML = 'Failed.';
}
if (ip <= IP_MAX-2) {
setTimeout("saveIP("+(ip+2)+")", 1000);
}
}
var x = document.getElementsByClassName("pbButton");
x[x.length - 1].innerHTML = '<input type="button" class="btn" value="Load iFrames" onclick="loadIframes();" /><input type="button" class="btn" value="Save IPs" onclick="saveIPs();" />';
from ip-ranges.
Thanks @pughboy this was helpful
from ip-ranges.
Thanks @pughboy -- I'll refer people here in the short term.
from ip-ranges.
@pughboy & @rdehler A great hack guys. I see it working till button appearing; but once I click the Load iframe button, the page reloads and crashes.
What can we do it work it again? Verfication code is often painful, we all know. 😄
from ip-ranges.
Permanent solution: this repository is to be retired, and using this instead: https://github.com/rdehler/sfdc-whitelist-ips-chrome
from ip-ranges.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ip-ranges.