PageSourceSearch

https://www.gites64.com/lib_2/js/foncs/foncPrototype.js

js gites64.com collected 2026-10-04 07:46:52 UTC 2,188 bytes, 101 lines download raw bytes

1// Adrien 10/05/23 : Attention, ce fichier n'est plus utilisé sur la majorité des sites web excepté sur le compte client et le script de résa
2
3Array.prototype.in_array = function(p_val) {
4	for(var i = 0, l = this.length; i < l; i++) {
5		if(this[i] == p_val) {
6			return true;
7		}
8	}
9	return false;
10}
11
12Array.prototype.deleteItem = function(p_val) {
13	for(var i = 0, l = this.length; i < l; i++) {
14		if(this[i] == p_val) {
15			this[i]="";
16			return true;
17		}
18	}
19	return false;
20}
21
22Array.prototype.merge = function(tabAConcat) {
23	for (var i=0;i<tabAConcat.length;i++){
24  		this.push(tabAConcat[i]);
25  	}
26  	return true;
27}
28/*
29Array.prototype.join = function(glue) {
30	var ch="";
31	if (!glue)glue=",";
32	for (var i=0;i<this.length;i++){
33  		ch+=this[i]+glue;
34  	}
35  	ch=ch.substr(0,(ch.length-glue.length));
36  	
37  	return ch;
38}*/
39/*
40Array.prototype.toTabWithoutFunc= function(){
41	var val,tabOut;
42	for (var i=1;i<this.length;++i){
43		if (typeof(this[i]!="function"))tabOut[i]=this[i];
44	}
45	return tabOut;
46}*/
47String.prototype.getTabChInCaract = function(caract) {
48
49	var idx_deb=-1,idx_fin=-1;	
50	var tab=new Array();
51
52	for (var i=0;i<this.length;i++){
53		if (this[i]==caract){
54			if (idx_deb<0)idx_deb=i+1;
55			else {
56				idx_fin=i;
57				var ch=this.substring(idx_deb,idx_fin);
58				tab.push(ch);				
59				idx_deb=-1;
60				idx_fin=-1;
61			}
62		}
63	}
64  	return tab;
65}
66
67String.prototype.remplaceStr = function(chaine_a_remplacer,chaine_remplacement) {
68
69	var idx_deb=-1,idx_fin=-1;	
70	
71	idx_deb=this.indexOf(chaine_a_remplacer);
72	var ch_deb=this.substring(0,idx_deb);
73	var ch_fin=this.substring((idx_deb+chaine_a_remplacer.length),this.length);
74	
75	var ch=ch_deb+chaine_remplacement+ch_fin;
76
77	return new String(ch);
78}
79String.prototype.stripTags = function (){
80	return this.replace(/<\/?[^>]+>/gi, '');
81}
82String.prototype.yaTags = function (){
83	var er=/<\/?[^>]+>/gi;
84	return er.test(this);
85}
86
87
88
89function getTextSelectInDocument() {
90	var txt;
91    if (window.getSelection) {
92          txt=window.getSelection().toString();
93    }
94    else if (document.getSelection) {
95        txt=document.getSelection();
96    }
97    else if (document.selection) {
98        txt=document.selection.createRange().text;
99    }
100    return txt;
101}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.