Comments (9)
Sure-- just host the widget code on your site, then when you include it add
an extra parameter to specify the path of your self-hosted iframe directory:
<script type="text/javascript">
// no trailing slash
var _bftn_options = { iframe_base_path: 'relative/path/to/iframe' }
</script>
<script src="relative/path/to/widget.min.js" async></script>
Please be sure to stay up to date with commits, as we are actively
developing and will push out improvements over the next few days. Sign up
for our developer mailing list at https://www.battleforthenet.com/sept10th
to get any updates.
On Thu, Sep 4, 2014 at 2:28 PM, Dabo Ross [email protected] wrote:
I would like to include this on my website, but having it directly run
javascript that can change at any time seems like a major security risk.Is there any possibility a zip/tar.gz download could be provided that only
uses relative URLs, or just instructions on how to make one?—
Reply to this email directly or view it on GitHub
#5.
from battleforthenet-widget.
Ok awesome, thanks!
from battleforthenet-widget.
Similar question: why does the src link in your examples not specify https?
Thanks!
from battleforthenet-widget.
Specifying // instead of http:// or https:// will use whatever transfer protocol the main page is using. So if you're using a non-HTTPS site, we'll show a non-HTTPS widget. This just saves some server overhead.
We still use HTTPS within the widget for the form submit and Call Congress tool.
from battleforthenet-widget.
Related request :
Please make more explicit the relation between widget.min.js and widget.js.
I am not a web developper and I guess they are equivalent and the former is lighter (is that it ?) but it sounds tricky to say "look at widget.js" and then "but include widget.min.js".
Again I am not sure of the security implications of including an external frame into my website and I would rather not do it. So I wish you could deliver a .js version with no external reference except for links and (even better) something a total js noob like me would understand.
Anyway thank you for the effort and the good work !
from battleforthenet-widget.
The first time we use a flexible protocol in an example, maybe we could point out that it'll default to HTTPS, on sites that are served over HTTPS? Then again, maybe it's just simpler to explicitly add HTTPS as a protocol, as experienced web developers will realize that probably means a flexible protocol would be safe to use if they prefer it, like I do personally.
from battleforthenet-widget.
@yaps8 Thanks for your feedback! You can use the widget.js
file on your site. It'll load a little slower, but many of your visitors won't notice. Also, some of them might appreciate the increased code readability.
from battleforthenet-widget.
@yaps8 I would also recommend pulling the latest code as of September 10th so you have the most current version for the day of action. We're constantly rolling out improvements.
from battleforthenet-widget.
@yaps8 Yeah, as was (sort of) mentioned before, widget.js
and widget.min.js
are the same code, but widget.min.js
just uses less characters to do the same thing. It just loads a little faster (it's not really a big difference.)
from battleforthenet-widget.
Related Issues (20)
- Modal customization options + cloudflare HOT 2
- Instructions for Ruby on Rails applications HOT 1
- Use sandbox attribute on iframe
- Take away cookie? HOT 5
- Dokuwiki instructions? HOT 2
- Widget is not working HOT 2
- Net Neutrality is harmful for the internet HOT 3
- Non-FCC controlled ISPs should be excluded HOT 5
- Make it relevant to those outside of the US HOT 16
- Waiting for the phone call form battleforthenet to call a representative. HOT 1
- NaN in time fields HOT 5
- Net Neutrality popup?
- Disable popup HOT 3
- "Full Name" field does not autofocus HOT 1
- Time stuck at 0:00 indefinatly HOT 2
- Countdown date passed HOT 9
- Net Neutraility on STartUp HOT 1
- Is there any support for WordPress.com?
- Create a banner instead?
- quotes with tumblr code and spelling typo
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 battleforthenet-widget.