So I'm working on another plugin
and I've come across an issue I can't seem to get past.
I want vendor lookup from MAC address. I have a small 5 line sample which provides the lookup for the last row. The full array winds up being a hefty 775kb array scraped from http://standards.ieee.org/develop/regauth/oui/oui.txt Since it can't go on the router, I though pull it in locally. Safari, Chrome & Firefox prevent that.
Can a Gargoyle webpage pull a javascript file from an external website & have a browser load it successfully?
External javascript file (+wifi site survey)
Moderator: Moderators
-
- Moderator
- Posts: 250
- Joined: Thu Jan 17, 2013 11:43 pm
External javascript file (+wifi site survey)
TP-Link WDR3600 v1.1 running 1.5.10+ L10n-English (Built 20130922 - OpenWrt r38093)
TP-Link WDR4300 running 1.5.10+ i18n-English (Built 20131010 - OpenWrt r38286)
https://github.com/BashfulBladder/gargoyle-plugins/wiki
TP-Link WDR4300 running 1.5.10+ i18n-English (Built 20131010 - OpenWrt r38286)
https://github.com/BashfulBladder/gargoyle-plugins/wiki
Re: External javascript file (+wifi site survey)
Wow, you're on fire with plugins!
Maybe you can check, before downloading oui.txt, if there is an external storage such a hard drive, thumbdrive, etc plugged and then save the oui.txt file there.
I think It's an option to save space on router filesystem and also keep a single copy of file.
My 2 cents.

Maybe you can check, before downloading oui.txt, if there is an external storage such a hard drive, thumbdrive, etc plugged and then save the oui.txt file there.
I think It's an option to save space on router filesystem and also keep a single copy of file.
My 2 cents.
-
- Moderator
- Posts: 250
- Joined: Thu Jan 17, 2013 11:43 pm
Re: External javascript file (+wifi site survey)
yeah, I have needs. A "tech savvry neighbor" with all kinds of airs. And an inability to set passwords.FireVortex wrote:Wow, you're on fire with plugins!![]()
---------------------
I had been looking up things like JSONP & CORS....
The solution was already there - haserl can echo those variables from /tmp as the page loads for direct injection. Thanks Eric.
Code: Select all
<script>
<!--
<?
cat /tmp/OUIs.js
?>
//-->
</script>
Its not going to be transparent though. It will require the end user to either copy something to /tmp or maybe I can create a package that will install to /tmp.
-------------------------
In OpenWrt, /tmp is mapped to a tmpfs (temporary filesystem) that behaves like a ramdisk. Anything there doesn't survive a restart - it never gets onto the flash chip. I say this like I have no problem using RAM because I have 64MB of RAM on my router & the most strain I put on it is serving some webpages up.
Not every router is in the same boat, and it's not a perfect solution - but it is the one for me. I will also look into storing/installing onto a USB partition.
TP-Link WDR3600 v1.1 running 1.5.10+ L10n-English (Built 20130922 - OpenWrt r38093)
TP-Link WDR4300 running 1.5.10+ i18n-English (Built 20131010 - OpenWrt r38286)
https://github.com/BashfulBladder/gargoyle-plugins/wiki
TP-Link WDR4300 running 1.5.10+ i18n-English (Built 20131010 - OpenWrt r38286)
https://github.com/BashfulBladder/gargoyle-plugins/wiki