mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-05-07 16:55:27 -04:00
complete website code
This commit is contained in:
commit
c87ed1814a
238 changed files with 23025 additions and 0 deletions
23
js/docs/js/docs.js
Normal file
23
js/docs/js/docs.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Stop IE flicker */
|
||||
if ($.browser.msie == true) document.execCommand('BackgroundImageCache', false, true);
|
||||
ChiliBook.recipeFolder = "js/chili/";
|
||||
ChiliBook.stylesheetFolder = "js/chili/"
|
||||
|
||||
jQuery.fn.antispam = function() {
|
||||
return this.each(function(){
|
||||
var email = $(this).text().toLowerCase().replace(/\sdot/g,'.').replace(/\sat/g,'@').replace(/\s+/g,'');
|
||||
var URI = "mailto:" + email;
|
||||
$(this).hide().before(
|
||||
$("<a></a>").attr("href",URI).addClass("external").text(email)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("pre.javascript").chili();
|
||||
$("pre.html").chili();
|
||||
$("pre.css").chili();
|
||||
$("a.external").each(function() {this.target = '_new'});
|
||||
$("span.email").antispam();
|
||||
});
|
29
js/docs/js/examples.js
Normal file
29
js/docs/js/examples.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
$(function() {
|
||||
|
||||
// get javascript source
|
||||
$("#javascript pre").text($("#js").html());
|
||||
|
||||
if($("#demo").size() > 0) {
|
||||
// old school chaining...
|
||||
var html = $("#demo").html()
|
||||
.toLowerCase()
|
||||
.replace(/\n|\t|\r/g,'')
|
||||
.replace(/<td/g,'\t\t\t<td')
|
||||
.replace(/<\/td>/g,'</td>\n')
|
||||
.replace(/<th/g,'\t\t\t<th')
|
||||
.replace(/<\/th>/g,'</th>\n')
|
||||
.replace(/<\/tr>/g,'\t\t</tr>')
|
||||
.replace(/<tr>/g,'\n\t\t<tr>\n')
|
||||
.replace(/<thead/g,'\n\t<thead>')
|
||||
.replace(/<\/thead>/g,'\n\t</thead>')
|
||||
.replace(/<tbody/g,'\n\t<tbody')
|
||||
.replace(/<\/tbody>/g,'\n\t</tbody>')
|
||||
.replace(/<\/table>/g,'\n</table>')
|
||||
.replace(/-->/g,'-->\n');
|
||||
|
||||
$("#html pre").text(html);
|
||||
}
|
||||
$("pre.javascript").chili();
|
||||
$("pre.html").chili();
|
||||
$("pre.css").chili();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue