found drama

get oblique

code.

by Rob Friesel

to save myself and everyone else a lot of trouble, I’ve created a quick script for everyone’s (well… my favorite anyway) favorite Creative Commons license: the Attribution•Noncommercial•ShareALike license. This is the part where you ask “How does it work?” and I reply with:

For those of you using an “allscripts” or similar such file to hold all your useful javascripts in one place, add the following code:

function copyleft() {
document.write('<div class="copyleft">',
'<a href="http://creativecommons.org/licenses/by-nc-sa/1.0/"><img alt="Creative Commons License" border=0 src="http://creativecommons.org/images/public/somerights.gif"></a><br>',
'This work is licensed under a ',
'<a href="http://creativecommons.org/licenses/by-nc-sa/1.0/">Creative Commons License</a>.',
'</div>');
}

Then in your stylesheet file, add:

div.copyleft {
text-align: center;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-small;
}

(for those not using the above methods, email me (rob [at] found [no space!] drama [dot] net) for the workarounds!)

THEN when you post content that you want to include under that license, add the following:

<script>copyleft();</script>

And you’re good to go. See:

About Rob Friesel

Software engineer by day. Science fiction writer by night. Weekend homebrewer, beer educator at Black Flannel, and Certified Cicerone. Author of The PhantomJS Cookbook and a short story in Please Do Not Remove. View all posts by Rob Friesel →

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*