IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Modifier une URL en Javascript


Sujet :

JavaScript

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut Modifier une URL en Javascript
    Bonjour a tous voila mon problème je vous donne un exemple

    j'ai un lien http://www.pro-links.net/lien.php?f=http://ul.to/ghhfhd et dans se lien je veux que sa supprime http://www.pro-links.net/lien.php?f= comment faire et que sa me garde juste sa http://ul.to/ghhfhd

    voici le java-script que j'ai

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    'use strict';
     
    var re = RegExp('\\b(' + [
        'mixturecloud\\.com/video=',
        'purevid\\.com/v/[a-z0-9]+',
        '1fichier\\.com/',
        '1st-files\\.com/[a-z0-9]+',
        '2shared\\.com\\/file',
        '4shared\\.com/file/.+htm',
        'albafile\\.com/.+/.+html',
    	'asfile\\.com/file',
    	'bayfiles\\.com/file',
    	'bitshare\\.com/(file|\\?f)',
    	'cloudzer\\.net/file',
    	'crocko\\.com/[a-z0-9]+',
    	'extabit\\.com/file',
    	'dl.junocloud\\.me/.+/.+html',
    	'depfile\\.com/[a-z0-9]+',
    	'dizzcloud\\.com/dl',
    	'dl.free\\.fr/',
    	'extmatrix\\.com/files',
    	'filecloud\\.io\\/',
    	'filefactory\\.com/file',
    	'filepost\\.com/file',
    	'filerio\\.in/[a-z0-9]+',
    	'filesmonster\\.(biz|com)/download',
    	'fp\\.io/[a-z0-9]+',
    	'freakshare\\.com/file',
    	'gigapeta\\.com/dl/',
    	'hipfile.com/.+/.+html',
    	'hitfile.net/.+/.+html',
    	'hotfile\\.com/dl',
        'junocloud\\.me/.+/.+html',	
    	'jumbofiles\\.com/[a-z0-9]+',
    	'keep2share\\.cc/file/',
    	'letitbit\\.net/download',
    	'linksafe\\.me/d',
    	'luckyshare\\.net/[0-9]+',
    	'mediafire\\.com/?',
    	'mediafire\\.com/download',
    	'mega.co\\.nz/#![a-z0-9]+',
    	'megashares\\.com/\\??d',
    	'netload\\.in/datei',
    	'putlocker\\.com/file/',
    	'rapidgator\\.net/file',
    	'sendspace\\.com/file',
    	'ryushare\\.com/.+/',
    	'share-online\\.biz/dl/',
    	'shareflare.net/download/',
    	'solidfiles\\.com/d',
    	'sockshare\\.com/file',
    	'turbobit\\.net/.+html',
    	'ul\\.to/',
    	'unibytes\\.com/[a-z0-9]+',
    	'uploaded\\.(to|net)/file',
    	'uploading\\.com/',
    	'uptobox\\.com/[a-z0-9]+',
    	'vip-file\\.com/download',
    	'ziddu\\.com/download',
    	'zippyshare\\.com/',
    	].join('|') + ')', 'i');
     
    function main() {
    	if(re.test(location.href)) {
    		window.setTimeout(insertBar, 1000);
    	} else if(location.hash.indexOf('#magnet') == 0) {
    		document.body.querySelector('input[name="magnet"]').value = decodeURIComponent(location.hash.substr(1));
    		location.hash = '';
    	} else {
    		insertIcons(document.body);
    		var M = window.MutationObserver || window.WebKitMutationObserver;
    		new M(onMutations).observe(document.body, {childList:true, subtree:true, attributes:true, attributeFilter:['href']});
    	}
    }
     
    function onMutations(muts) {
    	for(var i = muts.length, mut; i-- && (mut = muts[i]);) {
    		if(mut.type == 'attributes') {
    			insertIcons(mut.target);
    		} else {
    			for(var j = mut.addedNodes.length, node; j-- && (node = mut.addedNodes[j]);) {
    				if(node.nodeType == 1) insertIcons(node);
    			}
    		}
    	}
    }
     
    function insertIcons(parent) {
    	var list = parent.tagName == 'A' ? [parent] : parent.querySelectorAll(location.pathname.indexOf('/folder/') > -1 ? 'a[href]' : 'a[href^="http"]');
    	for(var i = list.length, a; i-- && (a = list[i]);) {
    		if(!re.test(a.href) || a.href.indexOf('folder') > -1) continue;
    		var ns = a.nextElementSibling;
    		if(ns && ns.classList.contains('adh-link')) continue;
    		insertIcon(a, onWebClick, 'Ctrl-click or middle-click: copy URL, Alt-click: switch service');
    		var tc = a.textContent;
    		if(/^\s*download/i.test(tc) || re.test(tc)) {
    			var p = a.search.length > 1 ? a.search.substr(1) : a.pathname;
    			var h = a.hostname;
    			var fp = p.substr(p.lastIndexOf('/') + 1).replace('.html', '');
    			if(fp) {
    				a.textContent = fp + ' @ ' + h.substr(0, h.lastIndexOf('.')).replace('www.', '');
    				a.title = tc;
    			}
    		}
    	}
    	list = parent.querySelectorAll('a[href^="magnet:"]');
    	for(var i = list.length, a; i-- && (a = list[i]);) {
    		insertIcon(a, onMagnetClick, 'Alt-click: switch service');
    	}
    }
     
    function insertIcon(a, f, title) {
    	if(!insertIcon.styled) {
    		updateStyle();
    		insertIcon.styled = true;
    		GM_registerMenuCommand('Switch debrid service', switchServ);
    	}
    	var icon = document.createElement('a');
    	icon.className = 'adh-link adh-ready' + (f == onMagnetClick ? ' adh-magnet' : '');
    	icon.title = title;
    	icon.addEventListener('mousedown', f, false);
    	icon.addEventListener('click', drop, false);
    	a.parentNode.insertBefore(icon, a.nextSibling);
    }
     
    function updateStyle() {
    	var style = document.getElementById('adh-style'), inserted;
    	if(!style) {
    		style = document.createElement('style');
    		style.id = 'adh-style';
    		style.type = 'text/css';
    		document.head.appendChild(style);
    		inserted = true;
    	}
    	var s = serv();
    	style.textContent = '\
    		#adh-bar { position:fixed;z-index:2147483647;top:-1px;left:350px;right:350px;padding:0;height:20px;border-radius:0 0 5px 5px;background-color:white;border:1px solid gray;margin:0;text-align:center;font-weight:bold;font-family:sans-serif;color:black;font-size:14px;line-height:18px;text-shadow:none; }\
    		#adh-bar > a:first-of-type { display:none; }\
    		a.adh-link { display:inline-block!important; width:12px!important; height:12px!important; position:relative!important; bottom:-2px!important; margin:0 0 0 4px!important; border:1px solid gray!important; padding:0!important; box-shadow:none!important; border-radius:0!important; opacity:0.6; cursor:pointer; }\
    		a.adh-link:hover { opacity:1; }\
    		a.adh-ready { background: url(' + s.icon + ') no-repeat !important; }\
    		a.adh-busy { background: url(data:image/gif;base64,R0lGODlhDAAMAKIGAIForORZKAgSEz9PUFDH4AOeyf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJFAAGACwAAAAADAAMAAADK2g6rFbQseFgkU3ZCqfjhfc9XWYQaCqsQZuqrPsSq9AGmwLsoLMDPR1PkQAAIfkECRQABgAsAAAAAAwADAAAAyhoutX7qhX4JGsj68Cl3h32DVxAnEK6AOxJpMLaoqrCAq4F5c5+6o8EACH5BAkUAAYALAAAAAAMAAwAAAMqWGqsxcZB2VZ9kI0dOvjQNnTBB4Sc9wmsmDGs4L7xnBF4Thm5bvE9wi4BACH5BAkUAAYALAAAAAAMAAwAAAMrWGrc+qU5GKV5Io8NesvCNnTAp3EeIzZB26xMG7wb61pErj+Nvi8MX+6RAAAh+QQJFAAGACwAAAAADAAMAAADKlhqrMXGQdlWfZCNHTr40DZ0wQeEnPcJrJgxrOC+8ZwReE4ZuW7xPcIuAQAh+QQFFAAGACwAAAAADAAMAAADKGi61fuqFfgkayPrwKXeHfYNXECcQroA7EmkwtqiqsICrgXlzn7qjwQAOw==) no-repeat white !important; }\
    		a.adh-download { background: url(data:image/gif;base64,R0lGODlhDAAMALMKAHi2EqnbOnqzKFmbHYS7J3CrJFmOGWafHZLELaLVL////wAAAAAAAAAAAAAAAAAAACH5BAEAAAoALAAAAAAMAAwAAAQ7UElDq7zKpJ0MlkMiAMnwKSFBlGe6mtIhH4mazDKXIIh+KIUdb5goXAqBYc+IQfKKJ4UgERBEJQIrJgIAOw==) no-repeat white !important; }\
    		a.adh-magnet { ' + (s.magnet || !inserted ? '' : 'display:none!important;') + ' }\
    		a.adh-error { background:url(data:image/gif;base64,R0lGODlhDAAMAIAAAP///8wzACH5BAAAAAAALAAAAAAMAAwAAAIRjI+pGwBsHGwPSlvnvIzrfxQAOw==) no-repeat !important; }';
    }
     
    function insertBar() {
    	updateStyle();
    	var bar = document.createElement('div');
    	bar.id = 'adh-bar';
    	bar.textContent = 'Download Helper: ';
    	var a = document.createElement('a');
    	a.href = location.href;
    	bar.appendChild(a);
    	document.body.appendChild(bar);
    	insertIcons(a);
    }
     
    function drop(e) {
    	e.stopPropagation();
    	e.preventDefault();
    }
     
    function onWebClick(e) {
    	if(e.which > 2) return;
    	drop(e);
    	var sel = window.getSelection();
    	if(e.altKey) {
    		switchServ();
    		this.classList.remove('adh-error');
    		this.classList.add('adh-ready');
    		a.title = '';
    	} else if(sel.rangeCount && sel.getRangeAt(0).toString()) {
    		var list = document.body.querySelectorAll('a.adh-link:not(.adh-download)');
    		for(var i = list.length, a; i-- && (a = list[i]);) {
    			if(sel.containsNode(a.previousSibling, true)) unlock(a, false, true);
    		}
    	} else if(e.which == 2) {
    		unlock(this, false, true);
    	} else {
    		unlock(this, !e.ctrlKey, e.ctrlKey);
    	}
    }
     
    function onMagnetClick(e) {
    	e.stopPropagation();
    	if(e.which != 1) return;
    	if(e.altKey) return switchServ();
    	if(serv().magnet) GM_openInTab(serv().magnet + '#' + encodeURIComponent(this.previousSibling.href));
    }
     
    function unlock(a, start, copy) {
    	a.className = 'adh-link adh-busy';
    	if(copy && !req.pending) unlock.links = [];
    	req(a.previousSibling.href, function(data) {
    		if(data.error) {
    			a.className = 'adh-link adh-error';
    			a.title = data.error;
    		} else {
    			a.className = 'adh-link adh-download';
    			a.href = data.url;
    			a.removeEventListener('mousedown', onWebClick, false);
    			a.removeEventListener('click', drop, false);
    			a.title = data.size ? Math.round(parseInt(data.size)/1048576, 10) + ' MB' : '';
    			a.rel = 'noreferrer';
    			if(copy) unlock.links.push(data.url);
    			if(start) location.href = data.url;
    		}
    		if(!req.pending && unlock.links && unlock.links.length) {
    			var data = unlock.links.join('\n');
    			if(typeof GM_setClipboard == 'function')
    				GM_setClipboard(data);
    			else
    				window.alert(data);
    		}
    	});
    }
     
    function req(url, f) {
    	var s = serv();
    	if(!'pending' in req) req.pending = 0;
    	req.pending++;
    	GM_xmlhttpRequest({
    		method: s.post ? 'POST' : 'GET',
    		url: s.api(url),
    		data: s.post ? s.post.replace('%s', encodeURIComponent(url)) : null,
    		headers: {'Referer':s.ref,'Content-Type':s.post?'application/x-www-form-urlencoded; charset=UTF-8':''},
    		onload:	 function(r) {
    			req.pending--;
    			try {
    				f(s.parse(r.responseText));
    			} catch(ex) {
    				f({error:'Response: ' + r.responseText});
    			}
    		},
    		onerror: function() {
    			req.pending--;
    			f({error:'HTTP error'});
    		}
    	});
    }
     
    function serv(change) {
    	if(!serv.servs) {
    		serv.servs = [
    			{
    				name:'AllDebrid',
    				icon:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAxlBMVEX5xDsUDwUWEgX4wzv2wjr3wjoQDAQTDwQSDgQaFQYRDQT5wzocFgexiyo5LQ03Kw31wTo2Kg0dFwcVEAUVEQVXRBXDmS4fGQf2wTpAMw/vvDmigCZQPxNmUBiWdiT3wjvquDj3wzruvDhWRBSPcCKRcyJVQxTmtTcxJgwHBQLjsjbwvTlUQhT5wjmJbCAbFgYrIgo7Lg40KQwkHAnxsCopIAkeGAeidx0PDANdSRa2jyuviikYEwbysSssIQnRpDINCgMfFgMLOjofAAAAgElEQVR4XiXJUxIDQQAFwDfGGrFt28n9L5VJ5bOrwToxE16RaDIBwLkQvKD8VAJlBo6AmFKqXbCYVSs2qtMMAOOoadlsqNxBtNqRTro9Qn9A38oBhn+MxiqczuY/eIulXK03252fOewPhlopzVE5nM75JbjekjsBHk9KXwDC9wdfSksJ0hZ2CesAAAAASUVORK5CYII=',
    				magnet:'http://www.alldebrid.com/torrent/',
    				api:function(s) { return 'http://www.alldebrid.com/service.php?link=' + encodeURIComponent(s) + ' &nb=0&json=true&pw='; },
    				ref:'http://www.alldebrid.com/service/',
    				parse:function(text) { var o = JSON.parse(text); return {url:o.link,size:o.filesize,error:o.error}; }
    			},
    			{
    				name:'RealDebrid',
    				icon:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcpJREFUeNoAvAFD/gFISEj39/cBAQEBAQECAgL///8BAQH///8BAQEBAQEAAAAICAgE6+vr8vLzAgICAAAAAgICCQkI//8A+Pn4AgECAAD/BQUFCgoKBAsLCisrKRoaFAYGBtvb4czNzxUTEj49OBISDuzs8cTFyPj5+gNJSEWSko0TEQoYFRFVVVXo6OIbGRV5enoHCQM6OkE+Oy/DxMoEDg4M+fjrYmFu1tjavLWkPDQq9vj1vryzW15uGBkZxcGxTExEAvHx8wwNGZyckNXT0AH9/7Onqzk5Ow8RCCUlFezr68XGyAoJCAIICAbx8Ol8e42rqrITGRnb4efU0NL6+vTe4OsbGws5Oj/29fgCCAgJDw4K4+Xmf4OB8fP7o6+k4ujuQUFKm5iFuLa9AwQHr7C0AwIBArm7wefo6QICBdHQ3O7x/7/I0tfd3AAIAsbPz4qLh+rp7wEiIiLo6OoUFBIFBAXy8fn6/AcRFxjw9+n7B/EAAPoI/wgdEhoBISEh+vr6AgIC/v/+AgACAgMJBwgN/wYG+wP1AAH4/Pf4CQAGATIyMvX19f///wAAAAQEAf7+Af8AAf8CAgEFBwD/+gH+/QsJCAIMADU2v2RKa0cuAAAAAElFTkSuQmCC',
    				magnet:'http://www.real-debrid.com/torrents',
    				api:function(s) { return 'http://www.real-debrid.com/ajax/unrestrict.php?link=' + encodeURIComponent(s) + '&password=&remote=0'; },
    				ref:'http://www.real-debrid.com/downloader',
    				parse:function(text) { var o = JSON.parse(text); return {url:o.generated_links?o.generated_links[0][2]:null,size:o.file_size_bytes,error:o.message}; }
    			},
    			{
    				name:'SimplyDebrid',
    				icon:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbxJREFUeNokUc9LVFEUPue+K29mdLQZM39AoCiWMgs34iiBUSKuoggLWrQIBRVc1GJELYRyoRgounDhvsZ/IAkKBUEI2ohNWCqljk40Mum8N9N7990f3lEOHM738XH4vnOQPJkqKQt11FcwIX+ns39O80IpQhCULkBCwbVoOOiP3Y+21V7VVPJfbmR5/Shj+YsoIIBShQ5IW2uCfbeawg/GIZuL3m4RVrbIzUtGsCACZRjg5gy7qrk8VDZ4r/1ue+Tj12+HyRRFiZyBx0AwFJ50tChU/2nzZ+7sjHts/HHXl8RO6teBUkIyh7uOFB7xHNpQWdrb0zkXX6kuv/K0u62m1JxfiBX7fYzzjcTu2/cf0icZmjo+MhVfmxvhnL9Ziv/Y26sMBXuGJgIBX+xZ73T/w+fTi2hE7gggcJEXGKutux6feRl9NKBTGYCr7xZezS5R1OYNihdxBfc0RD1yRxPiIAlSmkRR6dhgGEopLGzygP33mAO7CTADw2Mv8ra9tbVJwbG0CCRIfRmX2Zl05EbD+sZnSUjeskZfT6a2vyMGw4jk8gnaGUHSdLOx+loFFzyxvfN3fx9M37kAAwB+J9VeekM5fQAAAABJRU5ErkJggg==',
    				api:function(s) { return 'http://simply-debrid.com/inc/name.php?i=' + encodeURIComponent(btoa(s.replace('//ul.to/', '//uploaded.net/file/'))); },
    				ref:'http://simply-debrid.com/generate',
    				parse:function(text) { var m = /href="(.+?)"/.exec(text); var url = m ? m[1] : null; return {url:url,size:0,error:url?null:text}; }
     
    			},
    			{
    				name:'Unrestrict.li',
    				icon:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZRJREFUeNpi/P//PwMSAHJ/fvnJ+I+RgY2BnZMdIsiCrOLJvft3lzz9dP4fMxPzT6bvEj7sJpEmrGycjHCTXj17sjH6OKcCk4gjz39GhjfHPrLc5mXQ/xLU5gtSdPLQqQcXHry58oGHg8utwomZmVlMXByobUHNoi/7/lk0qjK7GtnsqT325eWnn59/uFY4KigrMjD8PbX7yF9mBn1H3UPLD/759ZOJien/h8/vfjB+/c7wRUxKDGgANw+/no3R6u41TMzMv3i+3bn6gOnHx+8MjAw+NT5SppL3b9yBuI+PX+jv/39zSmb8fv+XS5yTiU+Qj59d6OfXn5GF0Y+uPPz5/SNEHdM3lr9vGDl+8vFy8TK+evpoUegWfm326ImRnJyc9+/eExUXO73v1NUZd4RdeCWEhSzDbEC+W9y0gv2Y4G+lT3I+ErzCvI/PPfm04T+H21/vLA8OTg6gqSBFP3/+ODj/4NcdzIy/Wf4z/Gdi/S8ezmocYsHKygqxGhGYv75///LqJ+N/Rk4RVg4eLuSYAAgwAHoTrM3FQ0nAAAAAAElFTkSuQmCC',
    				api:function(s) { return 'http://unrestrict.li/unrestrict.php'; },
    				post:'link=%s&domain=long',
    				ref:'http://unrestrict.li/download',
    				parse:function(text) { var o = JSON.parse(text), p; for(p in o) break; var error = o[p].invalid; if(error) return {error:error}; if(p.indexOf('://') < 0) { o = o[p]; for(p in o[p]) break; } return {url:p,size:o[p].size}; }
     
    			},
    			{
    				name:'DebridItalia',
    				icon:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAa1JREFUeNoUUd9LFFEUvr/m7u60Kqy6q2yrIEq9iAvrkmK1Zm8hSI9CRWX1XwlBhKlFQm/1oIivahqtEkTCTqGyOtvO3NmZe+/c8XjOy+Gcw/ed7zv4wcNHtp1RWtoZ2/PF2dkpJtRiljEGoYRQkiDEJivlpZfPoigKgoAQvLb+6eu3Ta0xZSw22uiYQvB0tlS6ybm1/PZdLtdbuz/TbJ7//nPitv4LP5BKUUJoV09vvr9fyvD9ylr96NfjhXnP8xqNv1DMzd4bKhXDQBCATWfSYdi5YdsXzcswkpynU5xPTIy/fvXi7tQdzjmTkZRS9eW6O2FYLJYsywLUhvNvdX2jkM/vHxw0nFM2OFgYGx0ZHRmuViuztZqSnfrRcdCJfN/zfb/dbkcyYtVK+fatMbfVerP0XAjxYfXj7t4hYzTFU+BCghIGsbW98/3wByhQSgWBcN02NKWSrutejynUinlCNC9dShlKMMYGALTWAwOFp08W4Xbw9mf9mHGLW4TFiWGUIoxjHccm7s5mhfA/b3xxHAfU4XJlmhIaX9MbIMUIwxLBkEgrRQiDN1wJMACyCdUafbVdewAAAABJRU5ErkJggg==',
    				api:function(s) { return 'http://www.debriditalia.com/api.php?generate=&link=' + escape(s); },
    				ref:'http://www.debriditalia.com/downloader.php',
    				parse:function(text) { var m = /http[^"><]+/.exec(text); return {url:m ? m[0] : null,size:0,error: m ? null : text}; }
     
    			}
    		];
    		serv.idx = Math.min(parseInt(GM_getValue('service', 0), 10), serv.servs.length - 1);
    	}
    	if(change) {
    		serv.idx = ++serv.idx >= serv.servs.length ? 0 : serv.idx;
    		GM_setValue('service', serv.idx);
    		updateStyle();
    	}
    	return serv.servs[serv.idx];
    }
     
    function switchServ() {
    	serv(true);
    }
     
    window.setTimeout(main, 100);

  2. #2
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 060
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 060
    Points : 44 585
    Points
    44 585
    Par défaut
    Bonsoir,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    alert( 'http://www.pro-links.net/lien.php?f=http://ul.to/ghhfhd'.split('=')[1]);

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    Sa na pas marcher sa me donne une alerte avec un message

    image 1


    image 2


    sur l'image se sont tous des liens qui son rediriger sur pro-links.net et l'url c'est sa

    http://www.pro-links.net/lien.php?f=....1fichier.com/
    http://www.pro-links.net/lien.php?f=.../hvn1.rar.html
    http://www.pro-links.net/lien.php?f=...m/91omes0u6fov

    qu'en je clic sur le bouton rd qui et en noir il me débride le lien mais la vue qu'il son rediriger sur pro-links.net il ne peut pas c'est pour sa que qu'en je clic sur le bouton rd il doit me supprimer le http://www.pro-links.net/lien.php?f= et me rediriger sur le reste

    le reste peut varier avec 1fichier.com rapidgator updobox

    voila et merci de votre aide

  4. #4
    Membre habitué Avatar de elfamine
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2011
    Messages
    113
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2011
    Messages : 113
    Points : 186
    Points
    186
    Par défaut
    Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    var url = "http://www.pro-links.net/lien.php?f=http://ul.to/ghhfhd",
        ptrn = "http://www.pro-links.net/lien.php?f=",
        output = url.replace(ptrn,"");
     
    alert(output);

    peut etre...

  5. #5
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 060
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 060
    Points : 44 585
    Points
    44 585
    Par défaut
    Sa na pas marcher sa me donne une alerte avec un message
    d'un autre coté si tu n'adapte pas il est clair que tu ne t'en sortira pas.

    Je te proposais simplement d'utiliser la méthode split()
    Comment scinder une chaîne de caractères en un tableau ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    var url = 'http://www.pro-links.net/lien.php?f=http://ul.to/ghhfhd'.split('=')[1];
    Citation Envoyé par elfamine
    alert(output);
    (sic)Sa na pas marcher sa me donne une alerte avec un message

  6. #6
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    non toujours pas il garde toujours pro-links.net il me redirige pas

  7. #7
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 060
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 060
    Points : 44 585
    Points
    44 585
    Par défaut
    Citation Envoyé par bouleanthony Voir le message
    non toujours pas il garde toujours pro-links.net il me redirige pas
    c'est vrai que l'on avance avec cela...

    Tu ne crois pas qu'il serait temps que tu nous en dises un peu plus et notamment sur la façon que tu as de procéder.

  8. #8
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    telecharge teamviewer mon id et 358346358 mot de pass 3712

  9. #9
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    se sont des liens qui son rediriger sur pro-links.net mon debrideur ne peut les debrider il ne reconnais pas pro-links.net il reconnais juste sa http://upvyjs.1fichier.com/

    http://www.pro-links.net/lien.php?f=....1fichier.com/

    qu'en je clic sur le bouton RD qui et en noir il me débride le lien mais la vue qu'il son rediriger sur pro-links.net il ne peut pas c'est pour sa que qu'en je clic sur le bouton RD il doit me supprimer le http://www.pro-links.net/lien.php?f= et me rediriger sur le reste http://upvyjs.1fichier.com/

    le reste peut varier avec 1fichier.com rapidgator updobox

    voila et merci de votre aide

  10. #10
    Membre habitué Avatar de elfamine
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2011
    Messages
    113
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2011
    Messages : 113
    Points : 186
    Points
    186
    Par défaut
    Citation Envoyé par NoSmoking Voir le message
    (sic)Sa na pas marcher sa me donne une alerte avec un message

  11. #11
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 060
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 060
    Points : 44 585
    Points
    44 585
    Par défaut
    Pourquoi ne pas appliquer ce que l'on t'a montrer et faire par exemple un
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <a href="http://www.pro-links.net/lien.php?f=http://upvyjs.1fichier.com/" onclick="this.href=this.href.split('=')[1]">C'est parti</a>

  12. #12
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    je mis connais pas trop en java il faut que le le mette ou le code

  13. #13
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 060
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 060
    Points : 44 585
    Points
    44 585
    Par défaut
    je mis connais pas trop en java
    pas besoin ici c'est du javascript.

    il faut que le le mette ou le code
    Attendu que l'on ne sait toujours pas comment est agencé ton code HTML, je dirais mets le là où cela risque de marcher

  14. #14
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    il n'y a pas de html c'est un fichier .js qui fonctionne avec firefox et le module greasemonkey c'est que tu java et j'ai mis le code java que j'ai dans mon premier message

  15. #15
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 640
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 669
    Points
    66 669
    Billets dans le blog
    1

  16. #16
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Septembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2013
    Messages : 8
    Points : 0
    Points
    0
    Par défaut
    je c'est pas ou il faut le mettre la function

Discussions similaires

  1. DisplayTag - Impossible de modifier une URL
    Par mattrixx dans le forum Taglibs
    Réponses: 8
    Dernier message: 06/12/2011, 10h58
  2. modifier une valeur en javascript
    Par alen22 dans le forum jQuery
    Réponses: 13
    Dernier message: 04/04/2011, 02h27
  3. Javascript pour modifier une URL
    Par J_help dans le forum Général JavaScript
    Réponses: 14
    Dernier message: 10/02/2010, 15h44
  4. Changer une URL en javascript, juste le #
    Par defacta dans le forum Général JavaScript
    Réponses: 12
    Dernier message: 08/11/2009, 12h41
  5. Modifier une url en ajax
    Par nicolas2603 dans le forum jQuery
    Réponses: 2
    Dernier message: 06/11/2009, 13h56

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo