Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Calling javascript in the header
do we just add the regular in the header or do we need to add some specal code tag, the head doesn't appear to look familiar mucho codeo
using nifty corners.js
using nifty corners.js
0
This discussion has been closed.
Comments
I need to add one of these to the head section, its not an extension just a normal JS
To achieve what you want you may try adding into youFile.js something like this (it is what I did in the DiceRoller extension, like old DOS resident applications initialization):
// Store the pointer to any previous onload function before registering mine
var oldWindowOnLoad = window.onload;
window.onload = yourFunction;
...
function yourFunction() {
... do whatever ...
// Last line, call other registered onLoad functions
oldWindowOnLoad;
}
This will execute your function on page load, and will also execute other previous onload function/s. If everyone who wants to add an onload function do this trick, all of them will be executed.
I believe in order for nifty corners to work, this has be just before the head tag as is
<script type="text/javascript"> window.onload=function(){ Nifty("div#box","big"); } </script>
but I' not certain for sure, that's the way its normally called