Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- if(wgCanonicalNamespace == 'User_blog') {
- if(urlQuery('useskin') != '') {
- window.location = window.location.href + ((window.location.href.indexOf('?') != -1) ? '&' : '?') + 'useskin=wikia';
- }
- else {
- if(url.indexOf('?') != -1) {
- var url = location.href;
- var quot = url.split('?');
- for(var j in quot) {
- if(quot[j].split('=')[0] == 'title') {
- title = quot[j].split('=')[1].split('&')[0];
- for(var k = 1; k < quot[j].split('&').length; k++) {
- if(quot[j].split('&')[k].split('=')[0] != 'useskin') {var urlquery += '&' + quot[j].split('&')[k];}
- }
- }
- }
- }
- else {
- var title = url.split('.')[url.split('.').length - 1].substring(url.split('.')[url.split('.').length - 1].indexOf('/', 4) + 1, url.length);
- }
- window.location = '/index.php?title=' + title + urlquery + '&useskin=wikia';
- }
- }
- });
- function urlQuery(quer) {
- for(i in location.href.split('?')) {
- for(j in location.href.split('?')[i].split('&')) {
- if(location.href.split('?')[i].split('&')[j].split('=')[0] == quer) {
- return location.href.split('?')[i].split('&')[j].split('=')[1];
- }
- }
- }
- return '';
- }
Advertisement
Add Comment
Please, Sign In to add comment