Moves chrome extentions to nostow
This commit is contained in:
		
							parent
							
								
									ed55a2f96e
								
							
						
					
					
						commit
						4ae2a52d21
					
				
					 8 changed files with 0 additions and 0 deletions
				
			
		
							
								
								
									
										29
									
								
								NOSTOW/chromeExtentions/dotcss/dotcss.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								NOSTOW/chromeExtentions/dotcss/dotcss.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
if(window.location.host.indexOf(".local") == -1){
 | 
			
		||||
	var xhr = new XMLHttpRequest();
 | 
			
		||||
	xhr.open('GET', 'https://dotcss.local.jh/' + window.location.host.replace(/^www\./, '') + '.css');
 | 
			
		||||
 | 
			
		||||
	xhr.onreadystatechange = function() {
 | 
			
		||||
		if(xhr.readyState == 4) {
 | 
			
		||||
			if(xhr.status == 200) {
 | 
			
		||||
				var style = document.createElement('style');
 | 
			
		||||
				style.textContent = xhr.responseText;
 | 
			
		||||
				document.head.appendChild(style);
 | 
			
		||||
				return
 | 
			
		||||
			} else if(xhr.status == 404) {
 | 
			
		||||
				var defaultXHR = new XMLHttpRequest();
 | 
			
		||||
				defaultXHR.open('GET', 'https://dotcss.local.jh/default.css');
 | 
			
		||||
				defaultXHR.onreadystatechange = function() {
 | 
			
		||||
					if (defaultXHR.readyState == 4 && defaultXHR.status == 200){
 | 
			
		||||
						var style = document.createElement('style');
 | 
			
		||||
						style.textContent = defaultXHR.responseText;
 | 
			
		||||
						document.head.appendChild(style);
 | 
			
		||||
						return;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				defaultXHR.send();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	xhr.send();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotcss/icon128.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotcss/icon128.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotcss/icon48.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotcss/icon48.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 3.3 KiB  | 
							
								
								
									
										14
									
								
								NOSTOW/chromeExtentions/dotcss/manifest.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								NOSTOW/chromeExtentions/dotcss/manifest.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{
 | 
			
		||||
  "name"             : "dotcss",
 | 
			
		||||
  "manifest_version" : 2,
 | 
			
		||||
  "version"          : "2.2.0",
 | 
			
		||||
  "description"      : "~/.css",
 | 
			
		||||
  "icons": { "48" : "icon48.png", "128" : "icon128.png" },
 | 
			
		||||
  "content_scripts": [{
 | 
			
		||||
    "all_frames" : true,
 | 
			
		||||
    "run_at"     : "document_start",
 | 
			
		||||
    "matches"    : ["http://*/*", "https://*/*"],
 | 
			
		||||
    "js"         : ["dotcss.js"]
 | 
			
		||||
  }],
 | 
			
		||||
  "permissions": ["tabs"]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										29
									
								
								NOSTOW/chromeExtentions/dotjs/dotjs.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								NOSTOW/chromeExtentions/dotjs/dotjs.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
if(window.location.host.indexOf(".local.jh") == -1){
 | 
			
		||||
	var xhr = new XMLHttpRequest();
 | 
			
		||||
	xhr.open('GET', 'https://dotjs.local.jh/' + window.location.host.replace(/^www\./, '') + '.js');
 | 
			
		||||
 | 
			
		||||
	xhr.onreadystatechange = function() {
 | 
			
		||||
		if(xhr.readyState == 4) {
 | 
			
		||||
			if(xhr.status == 200) {
 | 
			
		||||
				var script = document.createElement('script');
 | 
			
		||||
				script.textContent = xhr.responseText;
 | 
			
		||||
				document.head.appendChild(script);
 | 
			
		||||
				return;
 | 
			
		||||
			} else if(xhr.status == 404) {
 | 
			
		||||
				var defaultXHR = new XMLHttpRequest();
 | 
			
		||||
				defaultXHR.open('GET', 'https://dotjs.local.jh/default.js');
 | 
			
		||||
				defaultXHR.onreadystatechange = function() {
 | 
			
		||||
					if (defaultXHR.readyState == 4 && defaultXHR.status == 200){
 | 
			
		||||
						var script = document.createElement('script');
 | 
			
		||||
						script.textContent = defaultXHR.responseText;
 | 
			
		||||
						document.head.appendChild(script);
 | 
			
		||||
						return;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				defaultXHR.send();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	xhr.send();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotjs/icon128.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotjs/icon128.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 2.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotjs/icon48.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								NOSTOW/chromeExtentions/dotjs/icon48.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 922 B  | 
							
								
								
									
										14
									
								
								NOSTOW/chromeExtentions/dotjs/manifest.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								NOSTOW/chromeExtentions/dotjs/manifest.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{
 | 
			
		||||
  "name"             : "dotjs",
 | 
			
		||||
  "manifest_version" : 2,
 | 
			
		||||
  "version"          : "2.2.0",
 | 
			
		||||
  "description"      : "~/.js",
 | 
			
		||||
  "icons": { "48" : "icon48.png", "128" : "icon128.png" },
 | 
			
		||||
  "content_scripts": [{
 | 
			
		||||
    "all_frames" : true,
 | 
			
		||||
    "run_at"     : "document_start",
 | 
			
		||||
    "matches"    : ["http://*/*", "https://*/*"],
 | 
			
		||||
    "js"         : ["dotjs.js"]
 | 
			
		||||
  }],
 | 
			
		||||
  "permissions": ["tabs"]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue