Welcome To Snipplr
Everyone's Recent Snippets Tagged url
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This will return the value of "param" form the URI. For example if you have
www.example.com/index.html?param=some_value
it will return "some_value".
NOTE! This only works if you use Prototype JavaScript framework.
0
873
posted 12 years ago by srka
This will get the 11-character YouTube video ID from any valid YouTube URL.
Based on http://snipplr.com/view/57065/get-youtube-video-id/ but made more robust to handle additional URL inputs
0
1513
posted 12 years ago by jmiller
(I did not write this, but I forgot where I got it.)
This code will find all the variables passed though the URL and return the one you are looking for.
0
752
posted 13 years ago by sicbot
I found some cases where JavaScript won't properly handle the Plus symbol (+)
0
881
posted 13 years ago by Jamie
You do not have Page object available everywhere to use Page.ResolveUrl. Here is an alternate.
0
978
posted 13 years ago by plugables
Usage:
Let's say we have an url: http://primera.vremenno.net?foo=yes&bar=no
var hash = getUrlVars();
alert(hash['foo']); // returns 'yes'
alert(hash['bar']); // returns 'no'
0
1023
posted 13 years ago by a1ias
This will get the file path for something. Typically used with a cms:CMSRepeater
0
988
posted 13 years ago by inreflection7
Use this script in Automator, and make a Service of it. Then give the service a shortcut in System Preferences -> Keyboard
In the script you have to switch the "SETT_INN_API-KODE_FRA_PROWL_HER" with a Prowl API code (https://www.prowlapp.com/api_s...
0
951
posted 13 years ago by Macgeeky
Parses a url correctly even with a url as query parameter, also retuns dirname, basename and extension besides the other parse_url bits. See comments for more info.
0
922
posted 13 years ago by tasmanweb
IE9 renders google fonts nicer when combining two fonts into the same URL call in the style sheet.
2
879
posted 13 years ago by jamigibbs