jsPathto.min.js

language: Other
license: Other

Code for Snippet:

                
// jsPathto v0.0.2 07-17-09 09:52
// A nifty bit'o code to make use of RapidWeaver's %pathto()% syntax in javascript files. 
// Assembled for your RapidWeaver developing pleasure by Adam Merrifield (http://www.seydoggy.com)
function rtrim ( str, charlist ) { charlist = !charlist ? ' \s\xA0' : (charlist+'').replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1'); var re = new RegExp('[' + charlist + ']+$', 'g'); return (str+'').replace(re, ''); } trimFromPatha = "/jspathto.js"; jsPathtoa = rtrim(rwPathto, trimFromPatha); trimFromPathb = "scripts"; jsPathto = rtrim(jsPathtoa, trimFromPathb);
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 858
Date Added: 2010-03-11 18:23:21
Last Modified: 0000-00-00 00:00:00

Web Analytics