Commits

os0x  committed 82d2f56

fix install

  • Participants
  • Parent commits 271f40d

Comments (0)

Files changed (6)

File background.html

 <!DOCTYPE html>
 <html>
-<head>
 <meta charset="utf-8">
 <title>Chrome Stylist</title>
-<script type="text/javascript">
+<script>
 const NONE = 0;
 const ALL = 1;
 const PART = 2;
 		}
 		if (!meta_text || !css_text) return;
 		var prefixs = [], tmp;
-		while((tmp = /url-prefix\(['"]?([^'")]*)['"]?\)/g.exec(meta_text))) {
+		var e_prefix = /url-prefix\(['"]?([^'")]*)['"]?\)/g;
+		while((tmp = e_prefix.exec(meta_text))) {
 			prefixs.push(tmp[1].trim());
 		}
 		var domains = [];
-		while((tmp = /domain\(['"]?([^'")]*)['"]?\)/g.exec(meta_text))) {
+		var e_domain = /domain\(['"]?([^'")]*)['"]?\)/g;
+		while((tmp = e_domain.exec(meta_text))) {
 			domains.push(tmp[1].trim());
 		}
 		var urls = [];
-		while((tmp = /url\(['"]?([^'")]*)['"]?\)/g.exec(meta_text))) {
+		var e_url = /url\(['"]?([^'")]*)['"]?\)/g;
+		while((tmp = e_url.exec(meta_text))) {
 			urls.push(tmp[1].trim());
 		}
 		var patterns = [], plains = [];//, match_type = 'prefix';
 			prefixs.forEach(function(v){plains.push({type:'prefix',value:v});});
 		}
 		if (domains.length) {
-			patterns.push('^https?://[^/]*' + domains.map(function(s){return s.replace(/\W/g,'\\$&')}).join('|') + '/');
+			patterns.push('^https?://[^/]*(' + domains.map(function(s){return s.replace(/\W/g,'\\$&')}).join('|') + ')/');
 			domains.forEach(function(v){plains.push({type:'domain',value:v});});
 			//match_type = 'domain';
 		}

File manifest.json

 {
   "name": "Chrome Stylist",
   "description": "Chrome Stylist",
-  "version": "2.0.1",
+  "version": "2.0.4",
   "permissions": [ "tabs" , "http://*/", "https://*/"],
   "update_url": "http://ss-o.net/chrome_extension/ChromeStylist/updates.xml",
   "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6OrLV1xhHM3WMEydnMRoMZzDc1K/BQY7LfsL8qDmmq+XyBCf6vpEI1xSUP23ckblC5rG6baH/sp6gbRnFLNiu+gOT4e9UYgG71o+WSqeAkKO9w0JLZFguX/Ft89858MdRM3zcCORakNYj3Ux9QBcupYKfLTvF6d6PcsdibxenSwIDAQAB",

File stylist.css

Empty file added.
 		button.textContent = 'Install with Stylist';
 		p.appendChild(button);
 		button.addEventListener('click',function(evt){
+			var id = document.querySelector('#style-id').textContent.trim();
 			chrome.extension.sendRequest({
 				type: USER_STYLE_ORG,
-				src: 'http://' + USER_STYLE_ORG + location.pathname + '.css',
-				name: document.querySelector('h1').textContent.trim(),
+				src: 'http://' + USER_STYLE_ORG + '/styles/' + id + '.css',
+				name: document.querySelector('#stylish-description').textContent.trim(),
 				original:location.href
 			}, install_response);
 		});

File stylist32.png

Old
Old image
New
New image
 <?xml version="1.0" encoding="UTF-8"?>
 <gupdate xmlns="http://www.google.com/update2/response" protocol="2.0">
   <app appid="bofklfecnmepdijcbcodjccfpjnpebfk">
-    <updatecheck codebase="http://ss-o.net/chrome_extension/ChromeStylist.crx" version="2.0.1" />
+    <updatecheck codebase="http://ss-o.net/chrome_extension/ChromeStylist.crx" version="2.0.4" />
   </app>
 </gupdate>