Custom Feedly Styles (+ Always Show Left Menu)

Custom Feedly Styles(wide, slim, clean styles for all Views, open feed in background tab, config menu) Universal script! Works with: Firefox, Chrome, Opera, Pale Moon, Safari, IE...

当前为 2015-04-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @author Dexmaster
  3. // @date 2015-04-19
  4. // @description Custom Feedly Styles(wide, slim, clean styles for all Views, open feed in background tab, config menu) Universal script! Works with: Firefox, Chrome, Opera, Pale Moon, Safari, IE...
  5. // @grant GM_deleteValue
  6. // @grant GM_getValue
  7. // @grant GM_setValue
  8. // @grant GM_openInTab
  9. // @homepageURL https://openuserjs.org/scripts/Dexmaster/Custom_Feedly_Styles_(+_Always_Show_Left_Menu)
  10. // @icon http://s3.amazonaws.com/uso_ss/icon/171749/large.png
  11. // @include http://feedly.com/*
  12. // @include https://feedly.com/*
  13. // @name Custom Feedly Styles (+ Always Show Left Menu)
  14. // @namespace CustomFeedlyStyles
  15. // @noframes
  16. // @run-at document-end
  17. // @screenshot http://s3.amazonaws.com/uso_ss/22593/large.jpg
  18. // @version 3.0.1(RC1)
  19. // ==/UserScript==
  20. (function (window, unsafeWindow) {
  21. "use strict";
  22.  
  23. /** Declare Variables
  24. RES(et) Settings true/false;
  25. LOG to Console true/false
  26. **/
  27. var w = unsafeWindow || window,
  28. def, is, what, lg, lg2, RES = false,
  29. LOG = false, TESTS = true,
  30. CFS_info, name2col, CFS;
  31.  
  32. /** Forbid loading script in sub-frames **/
  33. if (w.self !== w.top) {
  34. return 1;
  35. }
  36.  
  37. /** Logical fnctions def - defined; is - is type; what - what it is? **/
  38. def = function (obj) {
  39. return obj !== undefined && obj !== null;
  40. };
  41. is = function (obj, type) {
  42. var clas = def(type) ? what(obj) : type;
  43. return def(obj) && clas !== 'undefined' && clas === type;
  44. };
  45. what = function (obj) {
  46. return Object.prototype.toString.call(obj)
  47. .slice(8, -1)
  48. .toLowerCase();
  49. };
  50.  
  51. /** Load script only once**/
  52. if (is(CFS, "object")) {
  53. return 2;
  54. }
  55.  
  56. lg = function () {
  57. if (LOG || TESTS) {
  58. try {
  59. var a = Array.prototype.slice.apply(arguments);
  60. a.unshift('[CFS]');
  61. console.log.apply(console, a);
  62. }
  63. catch (e) {
  64. }
  65. }
  66. };
  67. lg2 = function(){
  68. if(TESTS){
  69. lg.apply(w,arguments);
  70. }
  71. };
  72.  
  73. /** Version/Author info **/
  74. CFS_info = '<a href="https://openuserjs.org/scripts/Dexmaster/Custom_Feedly_Styles_%28+_Always_Show_Left_Menu%29">CFS v3.0.1(RC1)</a> by <a href="https://openuserjs.org/users/Dexmaster">Dexmaster</a>';
  75.  
  76.  
  77. /** Colors stuff **/
  78. name2col = function (col) {
  79. if (col) {
  80. col = col.toLowerCase()
  81. .replace(/[\|&;\$%@"'\- <>\(\)\+,]/g, "");
  82. }
  83. var cols = {
  84. "aeroblue": "#c9ffe5",
  85. "airforceblue": "#00308f",
  86. "airsuperiorityblue": "#72a0c1",
  87. "alabamacrimson": "#a32638",
  88. "aliceblue": "#f0f8ff",
  89. "alloyorange": "#c46210",
  90. "almond": "#efdecd",
  91. "amaranth": "#e52b50",
  92. "amazon": "#3b7a57",
  93. "amber": "#ffbf00",
  94. "americanrose": "#ff033e",
  95. "amethyst": "#9966cc",
  96. "androidgreen": "#a4c639",
  97. "antiflashwhite": "#f2f3f4",
  98. "antiquebrass": "#cd9575",
  99. "antiquebronze": "#665d1e",
  100. "antiquefuchsia": " #915c83",
  101. "antiqueruby": "#841b2d",
  102. "antiquewhite": "#faebd7",
  103. "ao": "#008000",
  104. "applegreen": "#8db600",
  105. "apricot": "#fbceb1",
  106. "aqua": "#00ffff",
  107. "aquamarine": "#7fffd4",
  108. "armygreen": "#4b5320",
  109. "arsenic": "#3b444b",
  110. "arylideyellow": "#e9d66b",
  111. "ashgrey": "#b2beb5",
  112. "asparagus": "#87a96b",
  113. "atomictangerine": "#ff9966",
  114. "aureolin": "#fdee00",
  115. "aurometalsaurus": "#6e7f80",
  116. "avocado": "#568203",
  117. "azure": "#f0ffff",
  118. "azuremist": "#f0ffff",
  119. "babyblue": "#89cff0",
  120. "babyblueeyes": "#a1caf1",
  121. "babypowder": "#fefefa",
  122. "bakermillerpink": "#ff91af",
  123. "ballblue": "#21abcd",
  124. "bananamania": "#fae7b5",
  125. "bananayellow": "#ffe135",
  126. "barnred": "#7c0a02",
  127. "bazaar": "#98777b",
  128. "bdazzledblue": "#2e5894",
  129. "beaver": "#9f8170",
  130. "beige": "#f5f5dc",
  131. "bigdiporuby": "#9c2542",
  132. "bisque": "#ffe4c4",
  133. "bistre": "#3d2b1f",
  134. "bitterlemon": "#cae00d",
  135. "bitterlime": "#bfff00",
  136. "bittersweet": "#fe6f5e",
  137. "bittersweetshimmer": "#bf4f51",
  138. "black": "#000000",
  139. "blackbean": "#3d0c02",
  140. "blackleatherjacket": "#253529",
  141. "blackolive": "#3b3c36",
  142. "blanchedalmond": "#ffebcd",
  143. "blastoffbronze": "#a57164",
  144. "blazeorange": "#ff6700",
  145. "bleudefrance": "#318ce7",
  146. "blizzardblue": "#ace5ee",
  147. "blond": "#faf0be",
  148. "blue": "#0000ff",
  149. "bluebell": "#a2a2d0",
  150. "blueberry": "#4f86f7",
  151. "bluebondi": "#0095b6",
  152. "bluebonnet": "#1c1cf0",
  153. "bluedefrance": "#318ce7",
  154. "bluegray": "#6699cc",
  155. "bluegreen": "#0d98ba",
  156. "bluegrey": "#6699cc",
  157. "bluesapphire": "#126180",
  158. "blueviolet": "#8a2be2",
  159. "blush": "#de5d83",
  160. "bole": "#79443b",
  161. "bondiblue": "#0095b6",
  162. "bone": "#e3dac9",
  163. "bostonunired": "#cc0000",
  164. "bostonuniversityred": "#cc0000",
  165. "bottlegreen": "#006a4e",
  166. "boysenberry": "#873260",
  167. "brandeisblue": "#0070ff",
  168. "brass": "#b5a642",
  169. "brickred": "#cb4154",
  170. "brightcerulean": "#1dacd6",
  171. "brightgreen": "#66ff00",
  172. "brightlavender": "#bf94e4",
  173. "brightmaroon": "#c32148",
  174. "brightpink": "#ff007f",
  175. "brightturquoise": "#08e8de",
  176. "brightube": "#d19fe8",
  177. "brinkpink": "#fb607f",
  178. "britishracinggreen": "#004225",
  179. "bronze": "#cd7f32",
  180. "bronzeyellow": "#737000",
  181. "brown": "#a52a2a",
  182. "brunswickgreen": "#1b4d3e",
  183. "bubblegum": "#ffc1cc",
  184. "bubbles": "#e7feff",
  185. "buff": "#f0dc82",
  186. "bulgarianrose": "#480607",
  187. "burgundy": "#800020",
  188. "burlywood": "#deb887",
  189. "burntorange": "#cc5500",
  190. "burntsienna": "#e97451",
  191. "burntumber": "#8a3324",
  192. "byzantine": "#bd33a4",
  193. "byzantium": "#702963",
  194. "cadet": "#536872",
  195. "cadetblue": "#5f9ea0",
  196. "cadetgrey": "#91a3b0",
  197. "cadmiumgreen": "#006b3c",
  198. "cadmiumorange": "#ed872d",
  199. "cadmiumred": "#e30022",
  200. "cadmiumyellow": "#fff600",
  201. "cafnoir": "#4b3621",
  202. "calpolygreen": "#1e4d2b",
  203. "cambridgeblue": "#a3c1ad",
  204. "cameopink": "#efbbcc",
  205. "camouflagegreen": "#78866b",
  206. "canaryyellow": "#ffef00",
  207. "candyapplered": "#ff0800",
  208. "candypink": "#e4717a",
  209. "caputmortuum": "#592720",
  210. "cardinal": "#c41e3a",
  211. "caribbeangreen": "#00cc99",
  212. "carmine": "#960018",
  213. "carminepink": "#eb4c42",
  214. "carminered": "#ff0038",
  215. "carnationpink": "#ffa6c9",
  216. "carnelian": "#b31b1b",
  217. "carolinablue": "#99badd",
  218. "carrotorange": "#ed9121",
  219. "castletongreen": "#00563f",
  220. "catalinablue": "#062a78",
  221. "cedarchest": "#c95a49",
  222. "ceil": "#92a1cf",
  223. "celadon": "#ace1af",
  224. "celadonblue": "#007ba7",
  225. "celadongreen": "#2f847c",
  226. "celeste": "#b2ffff",
  227. "celestialblue": "#4997d0",
  228. "cerisepink": "#ec3b83",
  229. "ceruleanblue": "#2a52be",
  230. "ceruleanfrost": "#6d9bc3",
  231. "cgblue": "#007aa5",
  232. "cgred": "#e03c31",
  233. "chadgray": "#8b8589",
  234. "chamoisee": "#a0785a",
  235. "champagne": "#f7e7ce",
  236. "charcoal": "#36454f",
  237. "charlestongreen": "#232b2b",
  238. "charmpink": "#e68fac",
  239. "chartreuse": "#dfff00",
  240. "cherry": "#de3163",
  241. "cherryblossompink": "#ffb7c5",
  242. "chestnut": "#954535",
  243. "chinapink": "#de6fa1",
  244. "chinarose": "#a8516e",
  245. "chinesered": "#aa381e",
  246. "chocolate": "#7b3f00",
  247. "chromeyellow": "#ffa700",
  248. "cinereous": "#98817b",
  249. "cinnabar": "#e34234",
  250. "cinnamon": "#d2691e",
  251. "citrine": "#e4d00a",
  252. "citron": "#9fa91f",
  253. "claret": "#7f1734",
  254. "classicrose": "#fbcce7",
  255. "cobalt": "#0047ab",
  256. "coconut": "#965a3e",
  257. "coffee": "#6f4e37",
  258. "columbiablue": "#9bddff",
  259. "coolblack": "#002e63",
  260. "coolgrey": "#8c92ac",
  261. "copper": "#b87333",
  262. "coppercrayola": "#da8a67",
  263. "copperpenny": "#ad6f69",
  264. "copperred": "#cb6d51",
  265. "copperrose": "#996666",
  266. "coquelicot": "#ff3800",
  267. "coral": "#ff7f50",
  268. "coralred": "#ff4040",
  269. "cordovan": "#893f45",
  270. "corn": "#fbec5d",
  271. "cornflowerblue": "#6495ed",
  272. "cornsilk": "#fff8dc",
  273. "cosmiclatte": "#fff8e7",
  274. "cottoncandy": "#ffbcd9",
  275. "crayola": "#1f75fe",
  276. "cream": "#fffdd0",
  277. "crimson": "#dc143c",
  278. "crimsonglory": "#be0032",
  279. "cyan": "#00ffff",
  280. "cybergrape": "#58427c",
  281. "daffodil": "#ffff31",
  282. "dandelion": "#f0e130",
  283. "darkblue": "#00008b",
  284. "darkbluegray": "#666699",
  285. "darkbrown": "#654321",
  286. "darkbyzantium": "#5d3954",
  287. "darkcandyapplered": "#a40000",
  288. "darkcerulean": "#08457e",
  289. "darkchestnut": "#986960",
  290. "darkcoral": "#cd5b45",
  291. "darkcyan": "#008b8b",
  292. "darkelectricblue": "#536878",
  293. "darkgoldenrod": "#b8860b",
  294. "darkgray": "#a9a9a9",
  295. "darkgreen": "#013220",
  296. "darkgrey": "#a9a9a9",
  297. "darkjunglegreen": "#1a2421",
  298. "darkkhaki": "#bdb76b",
  299. "darklava": "#483c32",
  300. "darklavender": "#734f96",
  301. "darkmagenta": "#8b008b",
  302. "darkmidnightblue": "#003366",
  303. "darkolivegreen": "#556b2f",
  304. "darkorange": "#ff8c00",
  305. "darkorchid": "#9932cc",
  306. "darkpastelblue": "#779ecb",
  307. "darkpastelgreen": "#03c03c",
  308. "darkpastelpurple": "#966fd6",
  309. "darkpastelred": "#c23b22",
  310. "darkpink": "#e75480",
  311. "darkpowderblue": "#003399",
  312. "darkraspberry": "#872657",
  313. "darkred": "#8b0000",
  314. "darksalmon": "#e9967a",
  315. "darkscarlet": "#560319",
  316. "darkseagreen": "#8fbc8f",
  317. "darksienna": "#3c1414",
  318. "darkskyblue": "#8cbed6",
  319. "darkslateblue": "#483d8b",
  320. "darkslategray": "#2f4f4f",
  321. "darkspringgreen": "#177245",
  322. "darktan": "#918151",
  323. "darktangerine": "#ffa812",
  324. "darkterracotta": "#cc4e5c",
  325. "darkturquoise": "#00ced1",
  326. "darkvanilla": "#d1bea8",
  327. "darkviolet": "#9400d3",
  328. "darkyellow": "#9b870c",
  329. "dartmouthgreen": "#00703c",
  330. "davysgrey": "#555555",
  331. "debianred": "#d70a53",
  332. "deepcarmine": "#a9203e",
  333. "deepcarminepink": "#ef3038",
  334. "deepcarrotorange": "#e9692c",
  335. "deepcerise": "#da3287",
  336. "deepchampagne": "#fad6a5",
  337. "deepchestnut": "#b94e48",
  338. "deepcoffee": "#704241",
  339. "deepfuchsia": "#c154c1",
  340. "deepjunglegreen": "#004b49",
  341. "deeplemon": "#f5c71a",
  342. "deeplilac": "#9955bb",
  343. "deepmagenta": "#cc00cc",
  344. "deepmauve": "#d473d4",
  345. "deeppeach": "#ffcba4",
  346. "deeppink": "#ff1493",
  347. "deepruby": "#843f5b",
  348. "deepsaffron": "#ff9933",
  349. "deepskyblue": "#00bfff",
  350. "deepspacesparkle": "#4a646c",
  351. "deeptaupe": "#7e5e60",
  352. "deeptuscanred": "#66424d",
  353. "deer": "#ba8759",
  354. "denim": "#1560bd",
  355. "desert": "#c19a6b",
  356. "desertsand": "#edc9af",
  357. "diamond": "#7d1242",
  358. "dimgray": "#696969",
  359. "dirt": "#9b7653",
  360. "dodgerblue": "#1e90ff",
  361. "dogwoodrose": "#d71868",
  362. "dollarbill": "#85bb65",
  363. "drab": "#967117",
  364. "dukeblue": "#00009c",
  365. "duststorm": "#e5ccc9",
  366. "earthyellow": "#e1a95f",
  367. "ebony": "#555d50",
  368. "ecru": "#c2b280",
  369. "eggplant": "#614051",
  370. "eggshell": "#f0ead6",
  371. "egyptianblue": "#1034a6",
  372. "eigengrau": "#16161D",
  373. "electricblue": "#7df9ff",
  374. "electriccrimson": "#ff003f",
  375. "electricgreen": "#00ff00",
  376. "electricindigo": "#6f00ff",
  377. "electriclavender": "#f4bbff",
  378. "electriclime": "#ccff00",
  379. "electricpurple": "#bf00ff",
  380. "electricultramarine": "#3f00ff",
  381. "electricviolet": "#8f00ff",
  382. "electricyellow": "#ffff33",
  383. "emerald": "#50c878",
  384. "emoblack": "#171717",
  385. "englishlavender": "#b48395",
  386. "englishred": "#ab4b52",
  387. "etonblue": "#96c8a2",
  388. "eucalyptus": "#44d7a8",
  389. "falured": "#801818",
  390. "fandango": "#b53389",
  391. "fandangopink": "#de5285",
  392. "fashionfuchsia": "#f400a1",
  393. "fawn": "#e5aa70",
  394. "feldgrau": "#4d5d53",
  395. "feldspar": "#fdd5b1",
  396. "ferngreen": "#4f7942",
  397. "ferrarired": "#ff2800",
  398. "fielddrab": "#6c541e",
  399. "findthebestblue": "#00ccff",
  400. "findthecompanyred": "#c51f1f",
  401. "findthecoupongreen": "#9ece08",
  402. "findthedatagreen": "#1d6660",
  403. "findthelistingpink": "#e83895",
  404. "fire": "#d70000",
  405. "firebrick": "#b22222",
  406. "fireenginered": "#ce2029",
  407. "flame": "#e25822",
  408. "flamingopink": "#fc8eac",
  409. "flattery": "#6b4423",
  410. "flavescent": "#f7e98e",
  411. "flax": "#eedc82",
  412. "floralwhite": "#fffaf0",
  413. "folly": "#ff004f",
  414. "forestgreen": "#228b22",
  415. "frenchbeige": "#a67b5b",
  416. "frenchbistre": "#856d4d",
  417. "frenchblue": "#0072bb",
  418. "frenchlilac": "#86608e",
  419. "frenchlime": "#9efd38",
  420. "frenchraspberry": "#c72c48",
  421. "frenchrose": "#f64a8a",
  422. "frenchskyblue": "#77b5fe",
  423. "frenchwine": "#ac1e44",
  424. "freshair": "#a6e7ff",
  425. "fuchsia": "#ff00ff",
  426. "fuchsiapink": "#ff77ff",
  427. "fuchsiarose": "#c74375",
  428. "fulvous": "#e48400",
  429. "fuzzywuzzy": "#cc6666",
  430. "gainsboro": "#dcdcdc",
  431. "gamboge": "#e49b0f",
  432. "ghostwhite": "#f8f8ff",
  433. "giantsorange": "#fe5a1d",
  434. "ginger": "#b06500",
  435. "glaucous": "#6082b6",
  436. "glitter": "#e6e8fa",
  437. "gogreen": "#00ab66",
  438. "gold": "#ffd700",
  439. "goldenbrown": "#996515",
  440. "goldenpoppy": "#fcc200",
  441. "goldenrod": "#daa520",
  442. "goldenyellow": "#ffdf00",
  443. "goldfusion": "#85754e",
  444. "grannysmithapple": "#a8e4a0",
  445. "grape": "#6f2da8",
  446. "gray": "#808080",
  447. "grayasparagus": "#465945",
  448. "green": "#1cac78",
  449. "greenmachine": "#3df500",
  450. "greenyellow": "#adff2f",
  451. "grey": "#808080",
  452. "grullo": "#a99a86",
  453. "guppiegreen": "#00ff7f",
  454. "halaybe": "#663854",
  455. "hanblue": "#446ccf",
  456. "hanpurple": "#5218fa",
  457. "harlequin": "#3fff00",
  458. "harvardcrimson": "#c90016",
  459. "harvestgold": "#da9100",
  460. "heliotrope": "#df73ff",
  461. "honeydew": "#f0fff0",
  462. "honolulublue": "#006db0",
  463. "hookersgreen": "#49796b",
  464. "hotmagenta": "#ff1dce",
  465. "hotpink": "#ff69b4",
  466. "huntergreen": "#355e3b",
  467. "iceberg": "#71a6d2",
  468. "icterine": "#fcf75e",
  469. "illuminatingemerald": "#319177",
  470. "imperial": "#602f6b",
  471. "imperialblue": "#002395",
  472. "inchworm": "#b2ec5d",
  473. "indiagreen": "#138808",
  474. "indianred": "#cd5c5c",
  475. "indianyellow": "#e3a857",
  476. "indigo": "#4b0082",
  477. "indigodye": "#00416a",
  478. "internationalkleinblue": "#002fa7",
  479. "internationalorange": "#ff4f00",
  480. "iris": "#5a4fcf",
  481. "irresistible": "#b3446c",
  482. "isabelline": "#f4f0ec",
  483. "islamicgreen": "#009000",
  484. "ivory": "#fffff0",
  485. "jade": "#00a86b",
  486. "jasmine": "#f8de7e",
  487. "jasper": "#d73b3e",
  488. "jazzberryjam": "#a50b5e",
  489. "jellybean": "#da614e",
  490. "jet": "#343434",
  491. "jonquil": "#f4ca16",
  492. "junebud": "#bdda57",
  493. "junglegreen": "#29ab87",
  494. "kandyred": "#ff2448",
  495. "kellygreen": "#4cbb17",
  496. "kenyancopper": "#7c1c05",
  497. "khaki": "#c3b091",
  498. "kobe": "#882d17",
  499. "kobi": "#e79fc4",
  500. "kucrimson": "#e8000d",
  501. "languidlavender": "#d6cadd",
  502. "lapislazuli": "#26619c",
  503. "lasallegreen": "#087830",
  504. "laserlemon": "#ffff66",
  505. "laured": "#f60018",
  506. "laurelgreen": "#a9ba9d",
  507. "lava": "#cf1020",
  508. "lavender": "#e6e6fa",
  509. "lavenderblue": "#ccccff",
  510. "lavenderblush": "#fff0f5",
  511. "lavenderfloral": "#b57edc",
  512. "lavendergray": "#c4c3d0",
  513. "lavenderindigo": "#9457eb",
  514. "lavendermagenta": "#ee82ee",
  515. "lavendermist": "#e6e6fa",
  516. "lavenderpink": "#fbaed2",
  517. "lavenderpurple": "#967bb6",
  518. "lavenderrose": "#fba0e3",
  519. "lawngreen": "#7cfc00",
  520. "lemon": "#fff700",
  521. "lemonchiffon": "#fffacd",
  522. "lemoncurry": "#cca01d",
  523. "lemonlime": "#e3ff00",
  524. "lemonmeringue": "#f6eabe",
  525. "lemonyellow": "#fff44f",
  526. "licorice": "#1a1110",
  527. "lightblue": "#add8e6",
  528. "lightbrown": "#b5651d",
  529. "lightcarminepink": "#e66771",
  530. "lightcoral": "#f08080",
  531. "lightcornflowerblue": "#93ccea",
  532. "lightcrimson": "#f56991",
  533. "lightcyan": "#e0ffff",
  534. "lightfuchsiapink": "#f984ef",
  535. "lightgoldenrodyellow": "#fafad2",
  536. "lightgray": "#d3d3d3",
  537. "lightgreen": "#90ee90",
  538. "lightgrey": "#d3d3d3",
  539. "lightkhaki": "#f0e68c",
  540. "lightmediumorchid": "#d39bcb",
  541. "lightorchid": "#e6a8d7",
  542. "lightpastelpurple": "#b19cd9",
  543. "lightpink": "#ffb6c1",
  544. "lightsalmon": "#ffa07a",
  545. "lightsalmonpink": "#ff9999",
  546. "lightseagreen": "#20b2aa",
  547. "lightskyblue": "#87cefa",
  548. "lightslategray": "#778899",
  549. "lightslategrey": "#778899",
  550. "lightsteelblue": "#b0c4de",
  551. "lighttaupe": "#b38b6d",
  552. "lightyellow": "#ffffe0",
  553. "lilac": "#c8a2c8",
  554. "lime": "#00ff00",
  555. "limegreen": "#32cd32",
  556. "limerick": "#9dc209",
  557. "lincolngreen": "#195905",
  558. "linen": "#faf0e6",
  559. "littleboyblue": "#6ca0dc",
  560. "liver": "#534b4f",
  561. "lumber": "#ffe4cd",
  562. "lust": "#e62020",
  563. "magenta": "#ff00ff",
  564. "magentacrayola": "#ff55a3",
  565. "magentadye": "#ca1f7b",
  566. "magentapantone": "#d0417e",
  567. "magentaprocess": "#ff0090",
  568. "magicmint": "#aaf0d1",
  569. "magnolia": "#f8f4ff",
  570. "mahogany": "#c04000",
  571. "majorelleblue": "#6050dc",
  572. "malachite": "#0bda51",
  573. "manatee": "#979aaa",
  574. "mangotango": "#ff8243",
  575. "mantis": "#74c365",
  576. "mardigras": "#880085",
  577. "maroon": "#800000",
  578. "mauve": "#e0b0ff",
  579. "mauvelous": "#ef98aa",
  580. "mauvetaupe": "#915f6d",
  581. "mayablue": "#73c2fb",
  582. "meatbrown": "#e5b73b",
  583. "mediumaquamarine": "#66ddaa",
  584. "mediumblue": "#0000cd",
  585. "mediumcandyapplered": "#e2062c",
  586. "mediumcarmine": "#af4035",
  587. "mediumchampagne": "#f3e5ab",
  588. "mediumelectricblue": "#035096",
  589. "mediumjunglegreen": "#1c352d",
  590. "mediumlavendermagenta": "#dda0dd",
  591. "mediumorchid": "#ba55d3",
  592. "mediumpersianblue": "#0067a5",
  593. "mediumpurple": "#9370db",
  594. "mediumredviolet": "#bb3385",
  595. "mediumruby": "#aa4069",
  596. "mediumseagreen": "#3cb371",
  597. "mediumskyblue": "#80daeb",
  598. "mediumslateblue": "#7b68ee",
  599. "mediumspringbud": "#c9dc87",
  600. "mediumspringgreen": "#00fa9a",
  601. "mediumtaupe": "#674c47",
  602. "mediumturquoise": "#48d1cc",
  603. "mediumvermilion": "#d9603b",
  604. "mediumvioletred": "#c71585",
  605. "mellowapricot": "#f8b878",
  606. "melon": "#fdbcb4",
  607. "metallicseaweed": "#0a7e8c",
  608. "metallicsunburst": "#9c7c38",
  609. "mexicanpink": "#e4007c",
  610. "midnightblue": "#191970",
  611. "midnightgreeneaglegreen": "#004953",
  612. "midori": "#e3f988",
  613. "mikadoyellow": "#ffc40c",
  614. "mint": "#3eb489",
  615. "mintcream": "#f5fffa",
  616. "mintgreen": "#98ff98",
  617. "mistyrose": "#ffe4e1",
  618. "moccasin": "#faebd7",
  619. "moonstoneblue": "#73a9c2",
  620. "mordantred19": "#ae0c00",
  621. "mossgreen": "#addfad",
  622. "mountainmeadow": "#30ba8f",
  623. "mountbattenpink": "#997a8d",
  624. "msugreen": "#18453b",
  625. "mulberry": "#c54b8c",
  626. "mustard": "#ffdb58",
  627. "myrtle": "#21421e",
  628. "nadeshikopink": "#f6adc6",
  629. "napiergreen": "#2a8000",
  630. "naplesyellow": "#fada5e",
  631. "navajowhite": "#ffdead",
  632. "navy": "#000080",
  633. "navyblue": "#000080",
  634. "neoncarrot": "#ffa343",
  635. "neonfuchsia": "#fe4164",
  636. "neongreen": "#39ff14",
  637. "newcar": "#214fc6",
  638. "newyorkpink": "#d7837f",
  639. "nonphotoblue": "#a4dded",
  640. "northtexasgreen": "#059033",
  641. "nyanza": "#e9ffdb",
  642. "oceanboatblue": "#0077be",
  643. "ochre": "#cc7722",
  644. "oldburgundy": "#43302e",
  645. "oldgold": "#cfb53b",
  646. "oldlace": "#fdf5e6",
  647. "oldlavender": "#796878",
  648. "oldmauve": "#673147",
  649. "oldrose": "#c08081",
  650. "oldsilver": "#848482",
  651. "olive": "#808000",
  652. "olivedrab": "#6b8e23",
  653. "olivedrab7": "#3c341f",
  654. "olivine": "#9ab973",
  655. "onyx": "#353839",
  656. "operamauve": "#b784a7",
  657. "orange": "#ff7f00",
  658. "orangepeel": "#ff9f00",
  659. "orangered": "#ff4500",
  660. "orchid": "#da70d6",
  661. "orchidpink": "#f28dcd",
  662. "oriolesorange": "#fb4f14",
  663. "outerspace": "#414a4c",
  664. "outrageousorange": "#ff6e4a",
  665. "oxfordblue": "#002147",
  666. "pakistangreen": "#006600",
  667. "palatinateblue": "#273be2",
  668. "palatinatepurple": "#682860",
  669. "paleaqua": "#bcd4e6",
  670. "paleblue": "#afeeee",
  671. "palebrown": "#987654",
  672. "palecerulean": "#9bc4e2",
  673. "palechestnut": "#ddadaf",
  674. "palecornflowerblue": "#abcdef",
  675. "palegold": "#e6be8a",
  676. "palegoldenrod": "#eee8aa",
  677. "palegreen": "#98fb98",
  678. "palelavender": "#dcd0ff",
  679. "palemagenta": "#f984e5",
  680. "palepink": "#fadadd",
  681. "paleredviolet": "#db7093",
  682. "palerobineggblue": "#96ded1",
  683. "palesilver": "#c9c0bb",
  684. "palespringbud": "#ecebbd",
  685. "paletaupe": "#bc987e",
  686. "paleturquoise": "#afeeee",
  687. "palevioletred": "#d87093",
  688. "pansypurple": "#78184a",
  689. "papayawhip": "#ffefd5",
  690. "pastelblue": "#aec6cf",
  691. "pastelbrown": "#836953",
  692. "pastelgray": "#cfcfc4",
  693. "pastelgreen": "#77dd77",
  694. "pastelmagenta": "#f49ac2",
  695. "pastelorange": "#ffb347",
  696. "pastelpink": "#dea5a4",
  697. "pastelpurple": "#b39eb5",
  698. "pastelred": "#ff6961",
  699. "pastelviolet": "#cb99c9",
  700. "pastelyellow": "#fdfd96",
  701. "patriarch": "#800080",
  702. "peach": "#ffe5b4",
  703. "peachorange": "#ffcc99",
  704. "peachpuff": "#ffdab9",
  705. "peachyellow": "#fadfad",
  706. "peachykeen": "#ff6130",
  707. "pear": "#d1e231",
  708. "pearl": "#eae0c8",
  709. "pearlaqua": "#88d8c0",
  710. "pearlypurple": "#b768a2",
  711. "peridot": "#e6e200",
  712. "persianblue": "#1c39bb",
  713. "persiangreen": "#00a693",
  714. "persianindigo": "#32127a",
  715. "persianorange": "#d99058",
  716. "persianpink": "#f77fbe",
  717. "persianplum": "#701c1c",
  718. "persianred": "#cc3333",
  719. "persianrose": "#fe28a2",
  720. "persimmon": "#ec5800",
  721. "peru": "#cd853f",
  722. "phlox": "#df00ff",
  723. "phthaloblue": "#000f89",
  724. "phthalogreen": "#123524",
  725. "pictorialcarmine": "#c30b4e",
  726. "piggypink": "#fddde6",
  727. "pinegreen": "#01796f",
  728. "pink": "#ffc0cb",
  729. "pinklace": "#ffddf4",
  730. "pinkpearl": "#e7accf",
  731. "pinksherbet": "#f78fa7",
  732. "pistachio": "#93c572",
  733. "platinum": "#e5e4e2",
  734. "plum": "#dda0dd",
  735. "plumtraditional": "#8e4585",
  736. "portlandorange": "#ff5a36",
  737. "powderblue": "#b0e0e6",
  738. "princesspink": "#ff6e8c",
  739. "princetonorange": "#ff8f00",
  740. "prussianblue": "#003153",
  741. "puce": "#cc8899",
  742. "pumpkin": "#ff7518",
  743. "purple": "#800080",
  744. "purpleheart": "#69359c",
  745. "purplemountainmajesty": "#9678b6",
  746. "purplepizzazz": "#fe4eda",
  747. "purpletaupe": "#50404d",
  748. "quartz": "#51484f",
  749. "queenblue": "#436b95",
  750. "queenpink": "#e8ccd7",
  751. "rackley": "#5d8aa8",
  752. "radicalred": "#ff355e",
  753. "rajah": "#fbab60",
  754. "raspberry": "#e30b5d",
  755. "raspberrypink": "#e25098",
  756. "rawumber": "#826644",
  757. "razzledazzlerose": "#ff33cc",
  758. "razzmatazz": "#e3256b",
  759. "razzmicberry": "#8d4e85",
  760. "red": "#ff0000",
  761. "redbrick": "#cb4154",
  762. "redbrown": "#a52a2a",
  763. "reddevil": "#860111",
  764. "redorange": "#ff5349",
  765. "regalia": "#522d80",
  766. "resolutionblue": "#002387",
  767. "rhythm": "#777696",
  768. "richblack": "#004040",
  769. "richbrilliantlavender": "#f1a7fe",
  770. "richcarmine": "#d70040",
  771. "richelectricblue": "#0892d0",
  772. "richlavender": "#a76bcf",
  773. "richlilac": "#b666d2",
  774. "richmaroon": "#b03060",
  775. "riflegreen": "#414833",
  776. "robineggblue": "#00cccc",
  777. "rocketmetallic": "#8a7f80",
  778. "romansilver": "#838996",
  779. "rosebonbon": "#f9429e",
  780. "roseebony": "#674846",
  781. "rosegold": "#b76e79",
  782. "rosemadder": "#e32636",
  783. "rosepink": "#ff66cc",
  784. "rosequartz": "#aa98a9",
  785. "rosetaupe": "#905d5d",
  786. "rosevale": "#ab4e52",
  787. "rosewood": "#65000b",
  788. "rossocorsa": "#d40000",
  789. "rosybrown": "#bc8f8f",
  790. "royalazure": "#0038a8",
  791. "royalblue": "#002366",
  792. "royalblueweb": "#4169e1",
  793. "royalfuchsia": "#ca2c92",
  794. "royalpurple": "#7851a9",
  795. "ruber": "#ce4676",
  796. "rubinered": "#d10056",
  797. "ruby": "#e0115f",
  798. "rubyred": "#9b111e",
  799. "ruddy": "#ff0028",
  800. "ruddybrown": "#bb6528",
  801. "ruddypink": "#e18e96",
  802. "rufous": "#a81c07",
  803. "russet": "#80461b",
  804. "rust": "#b7410e",
  805. "rustyred": "#da2c43",
  806. "saddlebrown": "#8b4513",
  807. "saeeceambercolor": "#ff7e00",
  808. "safetyorange": "#ff6700",
  809. "saffron": "#f4c430",
  810. "salmon": "#ff8c69",
  811. "salmonpink": "#ff91a4",
  812. "sandstorm": "#ecd540",
  813. "sandybrown": "#f4a460",
  814. "sangria": "#92000a",
  815. "sapgreen": "#507d2a",
  816. "sapphire": "#0f52ba",
  817. "satinsheengold": "#cba135",
  818. "scarlet": "#ff2400",
  819. "scarletcrayola": "#fd0e35",
  820. "schnurrple": "#3c144f",
  821. "schoolbusyellow": "#ffd800",
  822. "screamingreen": "#76ff7a",
  823. "seablue": "#006994",
  824. "seagreen": "#2e8b57",
  825. "sealbrown": "#321414",
  826. "seashell": "#fff5ee",
  827. "selectiveyellow": "#ffba00",
  828. "sepia": "#704214",
  829. "shadow": "#8a795d",
  830. "shampoo": "#ffcff1",
  831. "shamrockgreen": "#009e60",
  832. "sheengreen": "#8fd400",
  833. "shimmeringblush": "#d98695",
  834. "shockingpink": "#fc0fc0",
  835. "shockingpinkcrayola": "#ff6fff",
  836. "sienna": "#a0522d",
  837. "silver": "#c0c0c0",
  838. "silverchalice": "#acacac",
  839. "silverpink": "#c4aead",
  840. "silversand": "#bfc1c2",
  841. "sinopia": "#cb410b",
  842. "skobeloff": "#007474",
  843. "skyblue": "#87ceeb",
  844. "skymagenta": "#cf71af",
  845. "slateblue": "#6a5acd",
  846. "slategray": "#708090",
  847. "slategrey": "#708090",
  848. "smitten": "#c84186",
  849. "smoke": "#738276",
  850. "smokeytopaz": "#933d41",
  851. "smokyblack": "#100c08",
  852. "snow": "#fffafa",
  853. "soap": "#cec8ef",
  854. "sonicsilver": "#757575",
  855. "spacecadet": "#1d2951",
  856. "spanishbistre": "#80755a",
  857. "spanishcarmine": "#d10047",
  858. "spanishcrimson": "#e51a4c",
  859. "spanishorange": "#e86100",
  860. "spanishskyblue": "#00aae4",
  861. "spiritualpurple": "#a54398",
  862. "spirodiscoball": "#0fc0fc",
  863. "springbud": "#a7fc00",
  864. "springgreen": "#00ff7f",
  865. "starcommandblue": "#007bbb",
  866. "steelblue": "#4682b4",
  867. "steelpink": "#cc3366",
  868. "stizza": "#990000",
  869. "stormcloud": "#4f666a",
  870. "stpatricksblue": "#23297a",
  871. "straw": "#e4d96f",
  872. "strawberry": "#fc5a8d",
  873. "sunglow": "#ffcc33",
  874. "superpink": "#cf6ba9",
  875. "tan": "#d2b48c",
  876. "tangelo": "#f94d00",
  877. "tangerine": "#f28500",
  878. "tawny": "#cd5700",
  879. "teagreen": "#d0f0c0",
  880. "teal": "#008080",
  881. "tealblue": "#367588",
  882. "tealdeer": "#99e6b3",
  883. "tealgreen": "#00827f",
  884. "tearoseorange": "#f88379",
  885. "tearoserose": "#f4c2c2",
  886. "telemagenta": "#cf3476",
  887. "terracotta": "#e2725b",
  888. "thistle": "#d8bfd8",
  889. "ticklemepink": "#fc89ac",
  890. "tiffanyblue": "#0abab5",
  891. "tigerseye": "#e08d3c",
  892. "timberwolf": "#dbd7d2",
  893. "titaniumyellow": "#eee600",
  894. "tomato": "#ff6347",
  895. "toolbox": "#746cc0",
  896. "topaz": "#ffc87c",
  897. "tropicalrainforest": "#00755e",
  898. "trueblue": "#0073cf",
  899. "tuftsblue": "#417dc1",
  900. "tulip": "#ff878d",
  901. "tumbleweed": "#deaa88",
  902. "turkishrose": "#b57281",
  903. "turquoise": "#30d5c8",
  904. "turquoiseblue": "#00ffef",
  905. "turquoisegreen": "#a0d6b4",
  906. "tuscanred": "#7c4848",
  907. "tuscany": "#c09999",
  908. "twilightlavender": "#8a496b",
  909. "tyrianpurple": "#66023c",
  910. "uablue": "#0033aa",
  911. "uared": "#d9004c",
  912. "ube": "#8878c3",
  913. "uclablue": "#536895",
  914. "uclagold": "#ffb300",
  915. "ufogreen": "#3cd070",
  916. "ultramarine": "#120a8f",
  917. "ultramarineblue": "#4166f5",
  918. "umber": "#635147",
  919. "unbleachedsilk": "#ffddca",
  920. "unitednationsblue": "#5b92e5",
  921. "universityofcaliforniagold": "#b78727",
  922. "universityoftennesseeorange": "#f77f00",
  923. "upforestgreen": "#014421",
  924. "upmaroon": "#7b1113",
  925. "upsdellred": "#ae2029",
  926. "urobilin": "#e1ad21",
  927. "usaf": "#00308f",
  928. "usafablue": "#004f98",
  929. "uscgold": "#ffcc00",
  930. "utahcrimson": "#d3003f",
  931. "vanillaice": "#f3d9df",
  932. "vegasgold": "#c5b358",
  933. "venetianred": "#c80815",
  934. "verdigris": "#43b3ae",
  935. "veronica": "#a020f0",
  936. "vintagemauve": "#b9adad",
  937. "violet": "#9f00ff",
  938. "violetblue": "#324ab2",
  939. "violetred": "#f75394",
  940. "viridian": "#40826d",
  941. "vividauburn": "#922724",
  942. "vividburgundy": "#9f1d35",
  943. "vividcerise": "#da1d81",
  944. "vividorchid": "#cc00ff",
  945. "vividtangerine": "#ffa089",
  946. "warmblack": "#004242",
  947. "waterspout": "#a4f4f9",
  948. "wenge": "#645452",
  949. "wheat": "#f5deb3",
  950. "white": "#ffffff",
  951. "whitesmoke": "#f5f5f5",
  952. "wildblueyonder": "#a2add0",
  953. "wildorchid": "#d77a02",
  954. "wildstrawberry": "#ff43a4",
  955. "wildwatermelon": "#fc6c85",
  956. "windsortan": "#ae6838",
  957. "wine": "#722f37",
  958. "wisteria": "#c9a0dc",
  959. "xanadu": "#738678",
  960. "yaleblue": "#0f4d92",
  961. "yankeesblue": "#1c2841",
  962. "yellow": "#ffff00",
  963. "yellowgreen": "#9acd32",
  964. "yelloworange": "#ffae42",
  965. "yellowrose": "#fff000",
  966. "zaffre": "#0014a8",
  967. "zinnwalditebrown": "#2c1608"
  968. };
  969. if (col) {
  970. col = def(cols[col]) ? cols[col] : col;
  971. }
  972. return col.toUpperCase();
  973. };
  974.  
  975. /** Custom Feedly Styles **/
  976. CFS = {
  977. conf: {},
  978.  
  979. /** START of Configuration *( to edit default config, do not remove vars elements only change ) **/
  980. conf_def: {
  981. main_css: {
  982. use: true,
  983. vars: {
  984. max_width: '100%',
  985. page_font: 'sans-serif'
  986. },
  987. text: 'Basic css *(variables: max_width - 00%|00px|00em max window width; page_font - font_name of any font currently present on your computer)'
  988. },
  989. left_menu_css: {
  990. use: true,
  991. vars: {},
  992. text: 'Always show Left Menu, and fix all misbehaviours of Feedle Left Menu'
  993. },
  994. dark_theme_fix: {
  995. use: true,
  996. vars: {},
  997. text: 'Fix Left Menu styles for dark theme for any display proportions'
  998. },
  999. cards_view_fix: {
  1000. use: true,
  1001. vars: {
  1002. card_width: "182px"
  1003. },
  1004. text: 'Cards View Fix *(width, proportions and slimming and decreasing distances of feeds in Cards View; variable card_width for 1080p I use 267px but for smaller screens default value is 182px )'
  1005. },
  1006. titles_fix: {
  1007. use: true,
  1008. vars: {},
  1009. text: 'Title overflow fix *(fixing problem of overflowins of titles and texts, and wrapping every object inside a feed to stay inside)'
  1010. },
  1011. page_proportions_fixes: {
  1012. use: true,
  1013. vars: {},
  1014. text: 'Page and side area proportions fix *(fixing proportions to Full Article and Magazine Views, to 68% and 66% of page)'
  1015. },
  1016. wiki_widget_fix: {
  1017. use: true,
  1018. vars: {},
  1019. text: 'WikiWidget in Article View Fix *(fixing a problem with WikiWidget in Article View)'
  1020. },
  1021. title_view_fix: {
  1022. use: true,
  1023. vars: {},
  1024. text: 'Title View fix *(restyling Title View and sliming out titles and summaries)'
  1025. },
  1026. some_cleaning: {
  1027. use: true,
  1028. vars: {
  1029. art_padding: "15px",
  1030. art_color: '#f9f9f9',
  1031. art_marg_top: '10px',
  1032. art_marg_bot: '10px'
  1033. },
  1034. text: 'Some cleaning *(variables: art - Full Article View, art_color - Full Article View Feed background, art_marg_* - Full Article top/bottom margines)'
  1035. },
  1036. remove_breaks: {
  1037. use: false,
  1038. vars: {},
  1039. text: 'Remove &lt;br&gt; from paragraphs'
  1040. },
  1041. share_feed_fix: {
  1042. use: true,
  1043. vars: {},
  1044. text: 'SocialIcons in LifeHacker posts'
  1045. },
  1046. hotkeys: {
  1047. use: true,
  1048. vars: {},
  1049. text: 'H - Open in new background tab ; U/Shift+U - Hide left/recommeded menu ; Shift+N/P - Next-Previous folder ; Shift+L/; - Previous-Next NonEmpty folder;<br />Shift+T - Toggle CFS config menu ;'
  1050. },
  1051. hide_left_menu: {
  1052. use: false,
  1053. vars: {},
  1054. text: 'Hide left menu entirely (also "U" hotkey), needs hotkeys option on to use hotkey :)'
  1055. },
  1056. use_full_width: {
  1057. use: false,
  1058. vars: {},
  1059. text: 'Hide Side Areas in Article and Magazine Views *(use 100% of Right Panel not some proportions)'
  1060. },
  1061. colors: {
  1062. use: true,
  1063. vars: {
  1064. action_color: '#82BD1A',
  1065. h1_color: '#000',
  1066. h2_color: '#36C',
  1067. unread_color: '#36C',
  1068. read_color: '#666',
  1069. summary_color: '#999',
  1070. tview_color: '#777'
  1071. },
  1072. text: 'Text colors generally for everything *(variables: action_color - action links color, h1_color - h1 color, h2_color - h2 color, unread_color - unread feeds color, read_color - read feeds color)'
  1073. },
  1074. background_colors: {
  1075. use: true,
  1076. vars: {
  1077. condtools_color: '#FFF',
  1078. select_color: '#FFFEEE',
  1079. hover_color: '#F5F5FE'
  1080. },
  1081. text: 'Background colors *(variables: condtools_color - Condensed Tools background color, select_color - Selected Feed background color, hover_color - Hover Feed background color)'
  1082. },
  1083. left_menu_colors: {
  1084. use: true,
  1085. vars: {
  1086. ltext_color: '#444',
  1087. dtext_color: '#AAA',
  1088. lsel_color: '#000',
  1089. dsel_color: '#FFF',
  1090. lcount_color: '#444',
  1091. lselcount_color: '#000',
  1092. dcount_color: '#888',
  1093. dselcount_color: '#FFF',
  1094. lnempty_color: '#555',
  1095. dnempty_color: '#DDD'
  1096. },
  1097. text: 'Left Menu colors (variable parts meanings:"l|d" - Ligh/Dark theme, "sel" - selected, "count" - counter, "nempty" - nonEmpty Category)'
  1098. },
  1099. rside_colors: {
  1100. use: true,
  1101. vars: {
  1102. recom_color: "#3498DB"
  1103. },
  1104. text: 'Right Side colors, for now "recom_color" - recommendations color'
  1105. },
  1106. compact_title_view: {
  1107. use: false,
  1108. vars: {},
  1109. text: 'Even more Slim Title View and fix for Compact View option in Preferences'
  1110. },
  1111. slim_condensed_tools: {
  1112. use: false,
  1113. vars: {},
  1114. text: 'Slim Condensed Tools *(Even more slim Condensed Tools for small screens)'
  1115. },
  1116. some_new_stuff: {
  1117. use: true,
  1118. vars: {},
  1119. text: 'Just some additional stuff :)'
  1120. },
  1121. mark_all_fix: {
  1122. use: true,
  1123. vars: {
  1124. mark_all_b_color: '#FFFFFF',
  1125. mark_all_b_hov_color: '#111111',
  1126. mark_all_back_color: '#3498DB',
  1127. mark_all_back_hov_color: '#3498DB',
  1128. mark_all_st_color: '#EFEFEF',
  1129. mark_all_st_hov_color: '#EFEFEF'
  1130. },
  1131. text: 'Changes in Mark All As Read button (suggested by fajfka)'
  1132. },
  1133. fixed_preview:{
  1134. use: true,
  1135. vars: {},
  1136. text: 'Fixed preview in Cards View (suggested by avist)'
  1137. },
  1138. my_styles: {
  1139. use: true,
  1140. vars: {
  1141. my_css: '/*some css*/'
  1142. },
  1143. text: 'Some User css *(variables: my_css - you could input here your own css for testing or just something you want)'
  1144. }
  1145. },
  1146. /** END of Configuration **/
  1147.  
  1148. css: {
  1149. main_css: 'html{overflow: auto !important;}body.home{top:0!important;margin: 0 auto;max-width: %max_width;}body, input, span, div, h1, h2, h3, .feedTitle, .u0Entry, .title, .entryBody, .metadata, .summary, .hhint, #messageBarContent, .categoryUnreadCountHint, .dot, a{font-family: %page_font !important;}',
  1150. left_menu_css: '#feedlyTabs{max-width: 200px;opacity: 1 !important;padding-left: 5px !important;padding-right: 55px !important;}#mainBar{width: calc(100% - 270px) !important;margin-left: 220px !important;margin-right: 5px;padding-right: 50px;}#mainBar > div{margin-right: -50px;}#mainBar > #mainArea, #feedlyPage > #mainArea, #feedlyPage > div{width:100% !important;}.panels{visibility: visible !important;}#navSelector_my{margin-left: 15px !important;padding-left: 5px !important;text-align: left !important;width: 70px !important;}#feedlyTabsHolder{background: inherit !important;box-shadow: none !important;opacity: 1 !important;width: 220px !important;z-index: 11 !important;}#feedlyTabsHolder div.simpleunreadcount{padding-left: 3px !important;width: 22px !important;}#feedlyTabsHolder:hover #feedlyTabs{overflow-y: auto;padding-right: 15px !important;}#navSelector_store{width: 110px !important;}#feedlyFrame, #feedlyPage, #feedlyPart{margin: auto !important;padding-right: 0 !important;width: 100% !important;}.tab{max-width:182px !important;}#feedlyTabs > div:first-child{position: absolute;left: 140px;}.slided #feedlyPart0{animation: none !important;}.unpinned ~ div#feedlyFrame > div#mainBar{transition: width 0.3s ease 0;}.unpinned.hidden ~ div#feedlyFrame > div#mainBar{margin-left: 0 !important; width: calc(100% - 50px) !important;}.unpinned.shown ~ div#feedlyFrame > div#mainBar{margin-left: 0 !important; width: calc(100% - 275px) !important;}',
  1151. dark_theme_fix: '',//.dark #feedlyTabsHolder{color: rgba(255, 255, 255, 0.7) !important;}.dark #feedlyTabsHolder #addtab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-add-active.png) !important;}.dark #feedlyTabsHolder #exploretab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-explore-active.png) !important;}.dark #feedlyTabsHolder #friendstab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-social-active.png) !important;}.dark #feedlyTabsHolder #historytab_icon_{background-image: url(http://s3.feedly.com/production/16.0/images/selector-history-active.png) !important;}.dark #feedlyTabsHolder #latesttab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-latest-active.png) !important;}.dark #feedlyTabsHolder #sharedtab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-shared-active.png) !important;}.dark #feedlyTabsHolder .handle{background-image: url(http://s3.feedly.com/production/16.0/images/selector-right-arrow-active.png) !important;}.dark #feedlyTabsHolder .handle.expanded{background-image: url(http://s3.feedly.com/production/16.0/images/selector-down-arrow-active.png) !important;}.dark #feedlyTabsHolder .my_icon, .dark #feedlyTabsHolder #mytab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-my-active.png) !important;}.dark #feedlyTabsHolder #savedtab_icon{background-image: url(http://s3.feedly.com/production/16.0/images/selector-saved-active.png ) !important;}.dark #store .language.selected, .dark .nonEmpty, .dark #feedlyTabsHolder #feedlyTabs .target.selected{color: #FFF !important;}.dark #storeTopics .topic{background: rgba(255, 255, 255, 0.15) !important;color: rgba(255, 255, 255, 0.4) !important;}.dark .navSelector{border-bottom-color: rgba(255, 255, 255, 0.1) !important;}.dark .navSelector.selected{border-bottom-color: rgba(255, 255, 255, 0.3) !important;color: #FFF !important;font-weight: 700 !important;}',
  1152. cards_view_fix: '.entryList.u5EntryList{width: 100%;}.u5EntryList .column{padding-right: 0.5% !important;width: 24.6% !important;}.u5EntryList .column.column_3_3{padding-right: 0 !important;}.u5EntryList .u5Entry, .u100Entry .entryHeader .entryTitle{margin-bottom: 10px !important;}.u5EntryList .u5Entry, .u5Entry .visual{background-color: #FFF;position: relative; margin-bottom: 10px; margin-right: 10px; width: %card_width !important;z-index: 9;}.u5EntryAnnotationHolder ~ div{margin-top: 10px !important;padding: 0 10px !important;}.u5EntryAnnotationHolder ~ div ~ div{padding: 0 10px 10px !important;}',
  1153. titles_fix: '.title, .title a,.title div, .content,.content div, .entryBody, .entryBody div{max-width: 100% !important;overflow-wrap: break-word;word-wrap: break-word;}',
  1154. page_proportions_fixes: '#sideArea{margin: 0 15px 0 0 !important;max-width: calc(32% - 120px) !important;position: absolute;right: 0;top: 50px;width: calc(32% - 120px) !important;display: block !important;}.sideAreaModule{max-width: 100% !important}.u100EntryList{max-width: 68% !important;width: 68% !important;}#realtimeSign{max-width: calc(68% - 34px) !important;width: calc(68% - 34px) !important;}.feedIndex{height: auto !important}.u4Entry{margin-bottom: 15px !important;max-width: 66% !important;}.inlineFrame table, .inlineFrame table tbody, .inlineFrame table tbody tr, .inlineFrame table tbody tr td,.u100Frame table, .u100Frame table tbody, .u100Frame table tbody tr, .u100Frame table tbody tr td, .u100EntryList .entryholder{background-color: transparent !important;display: block; max-width: 100% !important;padding-bottom: 0;}.entryBody iframe{margin: 0 !important;max-width: 100%;}',
  1155. wiki_widget_fix: '.WikiWidget > div:first-child > div:nth-child(4), .wikiWidgetShareHolder{position: absolute;}.bottomWikiWidget .abZone .ab{position: absolute;right: 50px;}.bottomWikiWidget{margin-top: 11px!important;}',
  1156. title_view_fix: '.u0Entry{border-top: 1px solid #EEEEEE;border-bottom: 1px solid #EEEEEE;height: 27px !important;padding-left: 0 !important;position: relative !important;}.u0Entry .sourceInfo{width: 120px !important;text-align: center;}.u0Entry .title:hover{z-index: 4;}.u0Entry > div:last-child, .u0Entry div div.recommendationInfo + div{display: block!important;position: relative!important;overflow: hidden;}.u0Entry, .u0Entry .title{white-space: nowrap;}.u0Summary{color: #999 !important;line-height: 29px;position: relative;white-space: nowrap;}.entryholder .u100entry,.condensed .entryholder .u100entry{margin:0!important;max-width: 99% !important}td.entryholder{width: 10000px !important;}.recommendationInfo{width:40px!important}',
  1157. some_cleaning: 'html,body{margin:0;padding:0;height:100%;}.content img,.content video{border: 1px #e9e9e9 solid !important;margin: 0 !important;height: auto !important;max-width: 100% !important;}#feedlyPart0.area{padding: 0 5px 0 12px !important;}#feedlyPageHeader{padding-top: 10px !important;}#feedlySignPart{position: fixed !important;top: 300px !important;}.u100Frame{background-color: %art_color !important;padding: %art_padding !important;margin-bottom: %art_marg_bot;margin-top: %art_marg_top;}.u100Entry a.title{font-size: 20px !important; line-height: 20px !important; max-width: 99% !important;}.inlineFrame{padding: 15px !important;}#feedlyTabs > div:first-child ~ div{margin: 15px 0;}#feedlyTabs > div:last-child{margin-bottom: 60px !important;}h2{margin-top: 2px !important; margin-bottom: 2px !important;height:auto !important}#feedlyPageHeader .hhint{margin-top: -8px; !important;display:inline-block !important;}#floatingBar #cacheRefresh{padding: 0;}.websiteCallForAction,.secondaryCallForAction,.headerInfo.headerInfo-article{margin-top: 5px !important;opacity: 0.7;}.u4Entry .marginMaker{margin-left: 0 !important;}#recommentationAreaHeadlines > div{margin-right: 1% !important;width: 20% !important;}.topRecommendedEntry > .visual{width: 100% !important;}.proShowcase{margin-top:10px !important;}#mainArea > #categoriesArea{width: 100%;}.topRecommendedEntry{width: 100%!important;}.itemContentsHolder{width: auto !important;}#floatingBar{margin-left:220px !important;padding-right: 84px !important;}#floatingBar .pageActionBar{margin-right: -50px;}#feedlyTabs #fixedProfile{width: 176px;}',
  1158. remove_breaks: '.content br{display: none !important;}',
  1159. share_feed_fix: '.u100Entry > .entryBody > .content > div > table > tbody > tr > td > a > img{display: inline !important;max-width: 20px !important;width: 20px !important;}',
  1160. hotkeys: '/** Hotkeys CSS **/',
  1161. hide_left_menu: '#feedlyTabsHolder{display:none !important}#mainBar{width: calc(100% - 50px) !important;margin-left:0 !important}#sideArea{width: calc(32% - 35px) !important;max-width: calc(32% - 35px) !important;}',
  1162. use_full_width: '#recommentationAreaHeadlines > div{width: 31% !important;margin-right:1% !important;}#sideArea{visibility:hidden;display:none !important;}#realtimeSign{width:calc(100% - 34px) !important;max-width:calc(100% - 34px) !important;}.u100EntryList{max-width: 100% !important;width: 100% !important;}.u4Entry{margin-bottom: 15px !important;max-width: 100% !important;}',
  1163. colors: '.categoryUnreadCountHint span,.entryBody a,.action{color: %action_color !important}h1{color: %h1_color !important;}h2{color: %h2_color !important;font-weight: 700 !important;}.unread,.notSubscribed .title{color: %unread_color !important;font-weight: 700 !important;}.title.read{color: %read_color !important;font-weight: 400 !important;}.u0Summary{color: %summary_color !important;}.u0Entry .sourceTitle a{color: %tview_color !important;}',
  1164. background_colors: '.u0Entry .condensedTools, .u0Entry .lastModified{background-color: %condtools_color !important;opacity: 0.7;}.selectedEntry{background-color: %select_color !important;}.u0Entry:hover{background-color: %hover_color !important;border-top-color: #aaa;border-bottom-color: #aaa;}',
  1165. left_menu_colors: '#feedlyTabsHolder{color: %ltext_color !important;}.dark #feedlyTabsHolder{color: %dtext_color !important;}.navSelector.selected,.tab .selected{color: %lsel_color !important;}.dark .navSelector.selected,.dark .tab .selected,.dark .tab .selected .label, .dark .tab .selected .feedTitle{color: %dsel_color !important;}.tab .simpleUnreadCount{color: %lcount_color !important;}.tab .selected .simpleUnreadCount{color: %lselcount_color !important;}.dark .tab .simpleUnreadCount{color: %dcount_color !important;}.dark .tab .selected .simpleUnreadCount{color: %dselcount_color !important;}.tab .nonEmpty{color: %lnempty_color !important;}.dark .tab .nonEmpty{color: %dnempty_color !important;}',
  1166. rside_colors: '.nbrRecommendations{color: %recom_color !important;}',
  1167. compact_title_view: '.u0Entry .title,.u0Entry .sourcetitle a,.u0Entry .sourceInfo,.u0Entry .lastModified,.u0Summary,.u0Entry .sourceTitle a{line-height: 24px !important;}.u0Entry .recommendationInfo,.u0Entry{height: 24px !important;}.u0Entry .quicklistHandle{height: 20px !important;margin-left: 0;margin-right: 0;width: 20px}.u0Entry .condensedTools{top: -1px;}.u0Entry .quicklistHandle:before{bottom: 0 !important;}.u0Entry .condensedTools, .u0Entry .lastModified{background-color: #FFF;position: relative;width: auto !important;z-index: 9;}.u0Entry .lastModified{max-width: 50px;padding: 0 5px !important;width: 50px !important;}.u0Entry .lastModified,.u0Entry .condensedTools{line-height: 22px !important;height: 28px !important;}.u0Entry .slim-favicon {margin: 4px 7px 0px 0px;}',
  1168. slim_condensed_tools: '.u0Entry .condensedTools a,.u0Entry .condensedTools img{margin: 0 -6px;}.u0Entry .lastModified{max-width: 30px;}',
  1169. some_new_stuff: '.column_0_2{float: left;margin-right: 1%;overflow: hidden;padding: 0 !important;width: 23% !important;}.column_0_2 .relatedLabel,.column_0_2 .related{width: 100%}.column_0_2 .relatedLabel{height: 100px;}.boxEntryHolder .column{float: left;margin-right: 1%;padding: 0 !important;width: 32%;}.boxInfo{padding-left: 5px !important;padding-right: 5px !important;width: 24% !important;}.boxRank{padding: 1%;width: 2%;}.boxOverview{margin-right: 0;padding-bottom: 5px !important;padding-top: 5px !important;}.boxEntryHolder{float: left;width: 60%;height: 150px;}.u19Entry{width:100% !important;}.u19Entry > div.visual{height: 95px;width: 100%;padding: 0 !important;}.u19Entry > div{padding: 6px !important;}.boxOverview{width: 98%;}.boxIcon{height: 13%;width: 4%;}#feedlyPage > div{margin-top: 0 !important;}#section0.section > .label > div{height: auto !important;}#feedlyBacksplashPart{max-width:100% !important;max-height:100% !important;position:fixed;}',
  1170. mark_all_fix: '#aboutArea{bottom: 0;left: 220px !important;padding: 10px 10px 5px !important;position: fixed;right: 0;width: calc(97% - 214px);z-index: 600;}#aboutArea #bigMarkAllAsReadStats{display:none;transition: all 0.5s ease-in-out 0s;}#aboutArea:hover{padding: 10px 10px 29px !important;}#aboutArea:hover #bigMarkAllAsReadStats{display:block;}#bigMarkAllAsReadButton{color: %mark_all_b_color !important;background: none repeat scroll 0 0 %mark_all_back_color;border-radius: 0 0 0 0;font-size: large !important;height: 54px !important;line-height: 50px !important;margin: 0;padding-top: 0 !important;width: calc(100% - 33px) !important;padding: 0 14px;transition: opacity 0.5s ease-in-out 0s;}#bigMarkAllAsReadButton:hover{color: %mark_all_b_hov_color !important;background: none repeat scroll 0 0 %mark_all_back_hov_color;}#bigMarkAllAsReadStats{color: %mark_all_st_color !important;margin: -23px 0 !important;width: calc(100% - 50px) !important;} #bigMarkAllAsReadButton:hover #bigMarkAllAsReadStats{color: %mark_all_st_hov_color !important;}#feedlyPart0.area{min-height: 99% !important;padding: 0 5px 60px 12px !important;}#feedlyPart0 > div#feedlyPart{min-height: 360px;}#mainArea ~ div > .cell{margin-left: 1%;margin-right: 1%;width: 23%;}.home #mainArea ~ div{padding:0 !important;width: 100% !important; margin: 0 0 10px 0 !important;}.home #mainArea .cell.c4 ~ div{margin-bottom: 0 !important;}.sliderContainer.bumperHolder,#recommendationInlineArea{width:100% !important}',
  1171. fixed_preview:'#recommendationInlineArea .inlineFrame{width: 579px;top: 10px;}#recommendationInlineArea .inlineFrame,.u5EntryList .inlineFrame{margin: 0 auto !important;position: absolute;left: calc(50% - 290px);}.u5EntryList .u5Entry{display: block !important;}.u100Frame .u100Entry{margin:0 !important;}.headerInfo.headerInfo-article{margin-top:0 !important;}#realtimeSign{margin-bottom: 10px !important;margin-top: 10px !important;}.floatingEntryContent.sliderContainer{width: calc(100% - 220px) !important;}.sliderWidth{width:96% !important}.entryholder .u100Entry,.sliderContainer .u100Entry{max-width: 100%;margin-bottom:0;margin-top:-1rem;}.headerInfo.sliderContainer{background-color: rgba(255, 255, 255, 0.9);width: calc(100% - 220px);z-index: 0;}.slideEntryContent{position: inherit;}.sliderPad.left,.sliderPad.right{padding-right:0 !important;z-index: 2;}.sliderPad .slideBumper div{background-color: #f4f4f4;opacity: 0.5;}.u0EntryList .u100Entry{max-width: 100%; width: 100%;}.inlineFrame .entryholder{padding-bottom: 0;}.u100Entry .shareBarHolder{margin-bottom: 0.5rem; margin-top: 0.5rem;}.inlineFrame .frameActionsTop{height: 0; line-height: 0; margin-top: 9px; opacity: 0;}', //top: 10px; to stay at top
  1172. my_styles: '/* */body{} %my_css body{}/* */'
  1173. },
  1174. ini: false,
  1175. getValue: '',
  1176. setValue: '',
  1177. deleteValue: '',
  1178. cl_ini: false,
  1179. cl_css: {},
  1180. /** fix_GMes for any browser **/
  1181. fix_GM: function () {
  1182. var gmCh = false;
  1183. try {
  1184. lg('[CFS.fix_GM]: Started GM_ functional fixes');
  1185. GM_setValue("gmCh", true);
  1186. gmCh = GM_getValue("gmCh");
  1187. } catch (ignore) {}
  1188. if (gmCh) {
  1189. CFS.getValue = GM_getValue;
  1190. CFS.setValue = GM_setValue;
  1191. CFS.deleteValue = GM_deleteValue;
  1192. lg('[CFS.fix_GM]: No need to Fix GM_ get/set/delete Value');
  1193. } else {
  1194. CFS.getValue = function (key, def) {
  1195. return localStorage[key] || def;
  1196. };
  1197. CFS.setValue = function (key, value) {
  1198. localStorage[key] = value;
  1199. return localStorage[key] === value;
  1200. };
  1201. CFS.deleteValue = function (key) {
  1202. return delete localStorage[key];
  1203. };
  1204. lg('[CFS.fix_GM]: Fixed GM_ get/set/delete Value');
  1205. }
  1206. lg('[CFS.fix_GM]: Finished GM_ functional fixes');
  1207. },
  1208. init: function () {
  1209. if (CFS.ini) {
  1210. return false;
  1211. }
  1212. CFS.ini = true;
  1213. lg('[CFS.init]: Script Initialized');
  1214. CFS.fix_GM();
  1215. CFS.initconf(RES);
  1216. CFS.calc_css();
  1217. document.body.addEventListener("DOMNodeInserted", CFS.add_tog);
  1218. lg('[CFS.init]: CFS.add_tog on body insert');
  1219. },
  1220. initconf: function (RES) {
  1221. if ( !! RES) {
  1222. CFS.conf = JSON.parse(JSON.stringify(CFS.conf_def));
  1223. } else {
  1224. CFS.conf = JSON.parse(decodeURI(CFS.getValue('conf', encodeURI(JSON.stringify(CFS.conf_def)))));
  1225. }
  1226. lg('[CFS.initconf]: Settings init //conf'); //conf= ', JSON.stringify(CFS.conf));
  1227. },
  1228. calc_css: function () {
  1229. if (CFS.cl_ini) {
  1230. return false;
  1231. }
  1232. CFS.cl_ini = true;
  1233. lg('[CFS.calc_css]: Calculation Started');
  1234. Object.keys(CFS.conf_def)
  1235. .forEach(function (key) {
  1236. CFS.calc_each(key);
  1237. });
  1238. lg('[CFS.calc_css]: Calculation Finished');
  1239. },
  1240. calc_each: function (key) {
  1241. if (!def(CFS.conf[key])) {
  1242. CFS.conf[key] = CFS.conf_def[key];
  1243. }
  1244. lg('[CFS.calc_each]: Adding ' + key);
  1245. if (CFS.conf[key].use) {
  1246. CFS.cl_css[key] = CFS.css_vars(CFS.css[key], CFS.conf_def[key].vars, CFS.conf[key].vars);
  1247. lg('[CFS.calc_each]: Added ', key, ' CSS');
  1248. } else {
  1249. CFS.cl_css[key] = '';
  1250. lg('[CFS.calc_each]: Missing ', key, ' CSS');
  1251. }
  1252. },
  1253. css_vars: function (css, vars, vars2) {
  1254. Object.keys(vars)
  1255. .forEach(function (key2) {
  1256. if (!def(vars2)) {
  1257. vars2 = vars;
  1258. }
  1259. if (key2.length > 0) {
  1260. if (!def(vars2[key2])) {
  1261. vars2[key2] = vars[key2];
  1262. }
  1263. lg('[CFS.calc_css]: Replacing variable ', key2, ' CSS');
  1264. css = CFS.str_mask(css, key2, vars2[key2]);
  1265. }
  1266. });
  1267. return css;
  1268. },
  1269. str_mask: function (str, mask, data) {
  1270. return str.split('%' + mask)
  1271. .join(data);
  1272. },
  1273. open_tab: function (url, back) {
  1274. /** back - background_tab flag, tried more universal approach, but hasn't been tested **/
  1275. if (back) {
  1276. var browser = 'Dunno',
  1277. el, evt, res = false;
  1278. //if (is(CFS.openInTab)){ // SH*Ts chrome and other browsers
  1279. if (navigator.userAgent.indexOf('Firefox') !== -1) { /** Firefox *( possible need in about:config "browser.tabs.loadInBackground: true", but it is default for a lot of releases )**/
  1280. browser = 'Firefox!';
  1281. res = GM_openInTab(url);
  1282. } else {
  1283. el = document.createElement("a");
  1284. el.href = url;
  1285. if (is(document.createEvent, "function")) { /** Chrome/Opera/?Safari?/?IE10? *( if you'd found some problems please report to Script Discussion section https://userscripts.org/scripts/discuss/171749 )**/
  1286. evt = document.createEvent("MouseEvents");
  1287. browser = 'Chrome/Opera/?Safari?/?IE10+?!';
  1288. evt.initMouseEvent("click", true, true, w, 0, 0, 0, 0, 0, true, false, false, false, 0, null); // ctrl+left button
  1289. res = el.dispatchEvent(evt);
  1290. } else if (document.createEventObject) { /** ?IE9-? *( if you'd found some problems please report to Script Discussion section https://userscripts.org/scripts/discuss/171749 )**/
  1291. evt = document.createEventObject();
  1292. evt.ctrlKey = true;
  1293. evt.button = 1; // ctrl+left button
  1294. browser = 'IE < 9!';
  1295. res = el.fireEvent("onclick", evt);
  1296. }
  1297. }
  1298. lg('[CFS.open_tab]: ', res ? 'Opened "' : 'Forbidden to open "', url, '" (in ', browser, ') ', back ? 'new background' : 'new', ' tab ');
  1299. } else {
  1300. w.open(url);
  1301. }
  1302. },
  1303. key_ch_right: function (evt) {
  1304. lg2('[CFS.key_ch_right] Proceed!');
  1305. CFS.key_check(evt, true);
  1306. },
  1307. key_ch_left: function (evt) {
  1308. lg2('[CFS.key_ch_left] Proceed!');
  1309. CFS.key_check(evt, false);
  1310. },
  1311. key_ch_doc: function (evt) {
  1312. lg2('[CFS.key_ch_doc] Proceed!');
  1313. CFS.key_check(evt, true);
  1314. },
  1315. key_check: function (evt, right) {
  1316. var el = null, all_lbls = [], non_emp_lbls = [],
  1317. index_all, index_non_emp, key_char;
  1318. evt = evt || w.event;
  1319.  
  1320. key_char = String.fromCharCode(evt.keyCode || evt.CharCode);
  1321.  
  1322. lg2('[CFS.key_check]On ', right ? 'Right' : 'Left', ' Panel, key_char -', key_char, '- was pressed! Shift:', evt.shiftKey ? 'Pressed' :
  1323. 'Not Pressed', ', Ctrl:', evt.ctrlKey ? 'Pressed' : 'Not Pressed', ', Alt:', evt.altKey ? 'Pressed' : 'Not Pressed', ', CharCode:', key_char.charCodeAt(0), '.');
  1324.  
  1325. if (evt.ctrlKey || evt.altKey || evt.metaKey) {
  1326. return false;
  1327. };
  1328.  
  1329. if ((key_char.charCodeAt(0) < 30) || (key_char.charCodeAt(0) > 111)) {
  1330. return false;
  1331. };
  1332.  
  1333. if ((!right) && (!document.querySelector('#navSelector_my')
  1334. .classList.contains('selected'))) {
  1335. return false;
  1336. };
  1337.  
  1338.  
  1339. if (document.querySelector('#feedlyTabs > div:last-child .header.target.selected') !== null) {
  1340. el = document.querySelector('#feedlyTabs > div:last-child .header.target.selected .label');
  1341. all_lbls = Array.prototype.slice.call(document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label'));
  1342. index_all = all_lbls.indexOf(el);
  1343. if (document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label.nonEmpty') !== null){
  1344. non_emp_lbls = Array.prototype.slice.call(document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label.nonEmpty'));
  1345. index_non_emp = non_emp_lbls.indexOf(el);
  1346. //if((index_non_emp <0) &&(non_emp_lbls.length>0)) index_non_emp = 0;
  1347. }
  1348. }
  1349. lg2('[CFS.key_check] el = ',el,' , all_lbls = ',all_lbls,' , index_all = ',index_all,' , non_emp_lbls = ',non_emp_lbls,' , index_non_emp = ',index_non_emp);
  1350. switch (key_char) {
  1351. case 'H':
  1352. if ((document.querySelector('.selectedEntry .title') !== null) && (!evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1353. CFS.open_tab(document.querySelector('.selectedEntry .title').href, true); //open new background tab
  1354. }
  1355. break;
  1356. case 'L':
  1357. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1358. if (non_emp_lbls.length >1){
  1359. if (index_non_emp <= 0) {
  1360. index_non_emp = non_emp_lbls.length-1;
  1361. } else {
  1362. index_non_emp -= 1;
  1363. }
  1364. lg('[CFS.key_check] Shift+L Pressed (',index_non_emp,non_emp_lbls[index_non_emp],')');
  1365. non_emp_lbls[index_non_emp].click();
  1366. }
  1367. }
  1368. break;
  1369. case ';':
  1370. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1371. if (non_emp_lbls.length >1){
  1372. if (index_non_emp >= non_emp_lbls.length-1) {
  1373. index_non_emp = 0;
  1374. } else {
  1375. index_non_emp += 1;
  1376. }
  1377. lg('[CFS.key_check] Shift+; Pressed (',index_non_emp,non_emp_lbls[index_non_emp],')');
  1378. non_emp_lbls[index_non_emp].click();
  1379. }
  1380. }
  1381. break;
  1382. case 'O':
  1383. if ((evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1384. lg('[CFS.key_check] Shift+O Pressed (Pin/Unpin Left Menu)');
  1385. CFS.pin();
  1386. }
  1387. break;
  1388. case 'P':
  1389. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1390. if (all_lbls.length >1){
  1391. if (index_all <= 0) {
  1392. index_all = all_lbls.length-1;
  1393. } else {
  1394. index_all -= 1;
  1395. }
  1396. lg('[CFS.key_check] Shift+P Pressed (',index_all,all_lbls[index_all],')');
  1397. all_lbls[index_all].click();
  1398. }
  1399. }
  1400. break;
  1401. case 'N':
  1402. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1403. if (all_lbls.length >1){
  1404. if (index_all >= all_lbls.length-1) {
  1405. index_all = 0;
  1406. } else {
  1407. index_all += 1;
  1408. }
  1409. lg('[CFS.key_check] Shift+N Pressed (',index_all,all_lbls[index_all],')');
  1410. all_lbls[index_all].click();
  1411. }
  1412. }
  1413. break;
  1414. case 'U':
  1415. if((!evt.ctrlKey) && (!evt.altKey)){
  1416. if(!evt.shiftKey){
  1417. document.querySelector('#hide_left_menu_lb')
  1418. .click();
  1419. } else {
  1420. document.querySelector('#use_full_width_lb')
  1421. .click();
  1422. }
  1423. }
  1424. break;
  1425. case 'T':
  1426. if((!evt.ctrlKey) && (!evt.altKey))
  1427. if(evt.shiftKey)
  1428. CFS.togw_wind();
  1429. break;
  1430. }
  1431. },
  1432. css_join: function (arr) {
  1433. var res = '';
  1434. Object.keys(arr)
  1435. .forEach(function (key) {
  1436. res += "/* " + key + " Begin */" + arr[key] + "/* " + key + " end */";
  1437. });
  1438. return res;
  1439. },
  1440. css_add: function (css) {
  1441. var chld = document.createElement('style'),
  1442. hds = document.getElementsByTagName('head')[0],
  1443. prnt = hds || document.documentElement;
  1444. chld.type = 'text/css';
  1445. chld.appendChild(document.createTextNode(css));
  1446. if (def(CFS.css_el)) {
  1447. CFS.css_el.parentElement.removeChild(CFS.css_el);
  1448. }
  1449. CFS.css_el = hds ? prnt.appendChild(chld) : prnt.insertBefore(chld, prnt.firstChild);
  1450. },
  1451. /** CFS window BEGIN **/
  1452. w_show: false,
  1453. w_wind: '',
  1454. w_css: '.CFS_conf{background-color:#FFFFFF;box-shadow: 0 0 2px 1px black;display:none;padding: 5px 5px 50px;position:fixed;right:1%;top:5px;z-index:900;}.CFS_conf.shown{display:block;}.opts{border-left: 1px solid black;border-bottom: 1px solid black;}.opts,.vars{display:block;float:right;margin:2px;padding:4px;}.cb{display:inline;margin:0;}.lb{cursor:pointer;display:inline;width:86%;}.vr{margin:2px;padding:0;width:65px;height:16px;border:1px solid black;}#my_css_vr.vr{width:auto;height:auto;}.opt .text{background-color: #F9F9F9;bottom:1%;display:none;position:absolute;right:1%;width:59%;height: 45px;}.opt:hover .text{display:block;}.btns{bottom:5%;left:1%;position:absolute;width: 38%;}.bt{cursor:pointer;margin:0 0;width:auto;}.tg.pageAction{display: inline-block;line-height: 17px;cursor:pointer;opacity: 0.45;transition: opacity 0.2s;vertical-align:top;}#feedlyPageHeader .tg{font-size:15px;line-height:26px;}.tg.selected,.tg:hover{opacity:1}.gray{background-color:#DDD}#CFS_info{position: absolute; bottom: 0; left: 2px;}',
  1455. togw_wind: function () {
  1456. document.querySelector('.CFS_conf')
  1457. .classList.toggle('shown');
  1458. document.querySelector('#feedlyPageHeader .tg')
  1459. .classList.toggle('selected');
  1460. document.querySelector('#floatingBar .tg')
  1461. .classList.toggle('selected');
  1462. CFS.w_show = !CFS.w_show;
  1463. },
  1464. wind_ini: function () {
  1465. if (CFS.cl_css !== '') {
  1466. //lg('[CFS.wind_ini]: ',CFS.cl_css);
  1467. CFS.cl_css.w_css = CFS.w_css;
  1468. CFS.css_add(CFS.css_join(CFS.cl_css));
  1469. lg('[CFS.wind_ini]: CFS.cl_css Added');
  1470. lg('[CFS.wind_ini]: Added ws style w_css');
  1471. }
  1472. CFS.w_wind = CFS.cr_el('div', document.body, 'CFS_conf');
  1473. lg('[CFS.wind_ini]: Added cfsw_wind');
  1474. var opts = CFS.cr_el('div', CFS.w_wind, 'opts'),
  1475. vars = CFS.cr_el('div', CFS.w_wind, 'vars'),
  1476. vars2 = CFS.cr_el('div', CFS.w_wind, 'vars'),
  1477. count = 0,
  1478. btns = CFS.cr_el('div', CFS.w_wind, 'btns'); /* , info =*/
  1479. CFS.cr_el('div', CFS.w_wind, 'text info', 'CFS_info', CFS_info);
  1480. Object.keys(CFS.conf_def)
  1481. .forEach(function (key) {
  1482. lg('[CFS.wind_ini]: ', key, what(CFS.conf[key]));
  1483. if (!def(CFS.conf[key])) {
  1484. CFS.conf[key] = CFS.conf_def[key];
  1485. }
  1486. var opt = CFS.cr_el('div', opts, 'opt', key + '_opt');
  1487. if (!CFS.conf[key].use) {
  1488. opt.classList.add('gray');
  1489. }
  1490. CFS.cr_el('input', opt, 'cb', key + '_use', CFS.conf[key].use);
  1491. CFS.cr_el('label', opt, 'lb', key + '_lb', key);
  1492. CFS.cr_el('div', opt, 'text', key + '_text', CFS.conf_def[key].text);
  1493. lg('[CFS.wind_ini]: Added option ', key);
  1494. Object.keys(CFS.conf_def[key].vars)
  1495. .forEach(function (key2) {
  1496. if (is(CFS.conf[key].vars[key2], 'undefined')) {
  1497. CFS.conf[key].vars[key2] = CFS.conf_def[key].vars[key2];
  1498. }
  1499. count += 1;
  1500. var varo = CFS.cr_el('div', (count < 20) ? vars : vars2, 'varo ' + key + '_v', key2 + '_varo');
  1501. if (!CFS.conf[key].use) {
  1502. varo.classList.add('gray');
  1503. }
  1504. var inp = 'input';
  1505. if (key2 === 'my_css') {
  1506. inp = 'textarea';
  1507. }
  1508. CFS.cr_el(inp, varo, 'vr', key2 + '_vr', CFS.conf[key].vars[key2]);
  1509. CFS.cr_el('div', varo, 'lb', key2 + '_lb', key2 + ' *(' + key + ')');
  1510. lg('[CFS.wind_ini]: Added var ', key2);
  1511. });
  1512. });
  1513. CFS.cr_el('input', btns, 'bt', 'save', CFS.saveconf);
  1514. CFS.cr_el('input', btns, 'bt', 'load', CFS.resconf);
  1515. CFS.cr_el('input', btns, 'bt', 'default', CFS.defconf);
  1516. CFS.cr_el('input', btns, 'bt', 'pin', CFS.pin);
  1517. /*
  1518. CFS.cr_el('input', btns, 'bt', 'import', CFS.re_imp);
  1519. CFS.cr_el('input', btns, 'bt', 'export', CFS.re_exp);
  1520. */
  1521. CFS.cr_el('input', btns, 'bt', 'close', CFS.togw_wind);
  1522. lg('[CFS.wind_ini]: Added buttons! ');
  1523. lg('[CFS.wind_ini]: Added info! ');
  1524. CFS.cr_el('div', document.querySelector('#feedlyPageHeader .pageActionBar'), 'tg', 'CFS');
  1525. CFS.cr_el('div', document.querySelector('#floatingBar .pageActionBar'), 'tg', 'CFS');
  1526. lg('[CFS.wind_ini]: Added toggles! ');
  1527. if (CFS.conf.hotkeys.use) {
  1528. /*document.querySelector('#mainBar')
  1529. .onkeyup = CFS.key_ch_right;
  1530. document.querySelector('#feedlyTabsHolder')
  1531. .onkeyup = CFS.key_ch_left;*/
  1532. document.onkeyup = CFS.key_ch_doc;
  1533. //window.onkeyup = CFS.key_check;
  1534. }
  1535. },
  1536. add_tog: function () {
  1537. document.body.removeEventListener("DOMNodeInserted", CFS.add_tog);
  1538. lg('[CFS.add_tog]: Trying to initialize! ');
  1539. if ((document.querySelector('#floatingBar') === null) || (document.title === "welcome to feedly")) {
  1540. lg('[CFS.add_tog]: Absent floatingBar! ');
  1541. setTimeout(CFS.add_tog, 500);
  1542. } else {
  1543. lg('[CFS.add_tog]: Present floatingBar! ');
  1544. CFS.wind_ini();
  1545. }
  1546. },
  1547. pin: function () {
  1548. var tb_hld = document.querySelector('#feedlyTabsHolder'), unp_bt = document.querySelector('#feedlyTabsUnpin'), pin_bt = document.querySelector('#feedlyTabsPin');
  1549. if(!!tb_hld){
  1550. if(!!tb_hld.classList){
  1551. if(tb_hld.classList.contains('pinned')){
  1552. if(!!unp_bt){
  1553. unp_bt.click();
  1554. lg('[CFS.pin] Unpinned Left Panel');
  1555. } else {
  1556. lg('[CFS.pin] Error Unpin Button not found!');
  1557. }
  1558. } else {
  1559. if(!!pin_bt){
  1560. pin_bt.click();
  1561. lg('[CFS.pin] Pinned Left Panel');
  1562. } else {
  1563. lg('[CFS.pin] Error Pin Button not found!');
  1564. }
  1565. }
  1566. }
  1567. }
  1568. },
  1569. re_imp: function () {
  1570. lg('[CFS.re_imp] '+(JSON.stringify(CFS.conf)));
  1571. },
  1572. re_exp: function () {
  1573. lg('[CFS.re_exp] '+(JSON.stringify(CFS.conf_def)));
  1574. },
  1575. resconf: function (RES) {
  1576. var rebuild = false;
  1577. lg('[CFS.resconf] Loading (Reseting?', is(RES, 'boolean'), ')');
  1578. CFS.initconf(is(RES, 'boolean'));
  1579. Object.keys(CFS.conf_def)
  1580. .forEach(function (key) {
  1581. if (!def(CFS.conf[key])) {
  1582. CFS.conf[key] = CFS.conf_def[key];
  1583. }
  1584. if (CFS.conf[key].use !== document.querySelector('#' + key + '_use')
  1585. .checked) {
  1586. document.querySelector('#' + key + '_opt label')
  1587. .click();
  1588. }
  1589. Object.keys(CFS.conf_def[key].vars)
  1590. .forEach(function (key2) {
  1591. if (!def(CFS.conf[key].vars)) {
  1592. CFS.conf[key].vars = CFS.conf_def[key].vars;
  1593. }
  1594. if (CFS.conf[key].vars[key2] !== document.querySelector('#' + key2 + '_vr')
  1595. .value) {
  1596. document.querySelector('#' + key2 + '_vr')
  1597. .value = CFS.conf[key].vars[key2];
  1598. document.querySelector('#' + key2 + '_vr')
  1599. .onblur();
  1600. rebuild = true;
  1601. }
  1602. });
  1603. if (rebuild) {
  1604. CFS.calc_each(key);
  1605. CFS.css_add(CFS.css_join(CFS.cl_css));
  1606. }
  1607. });
  1608. lg('[CFS.resconf] Applied!');
  1609. },
  1610. saveconf: function () {
  1611. CFS.deleteValue('conf');
  1612. lg('[CFS.saveconf] COnfigs : ', CFS.conf);
  1613. CFS.setValue('conf', encodeURI(JSON.stringify(CFS.conf)));
  1614. lg('[CFS.saveconf] Saved!');
  1615. },
  1616. colrs: function () {
  1617. var rgb, rgb_col = this.value,
  1618. text_col, yiq;
  1619. lg('[CFS.colrs]: Recieved color: ' + rgb_col);
  1620. rgb_col = name2col(rgb_col);
  1621. this.style.border = '1px solid black';
  1622. if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(rgb_col)) {
  1623. this.style.backgroundColor = rgb_col;
  1624. rgb = this.style.backgroundColor.match(/\d+/g);
  1625. yiq = ((rgb[0] * 299) + (rgb[1] * 587) + (rgb[2] * 114)) / 1000;
  1626. text_col = (yiq >= 128) ? '#000' : '#fff';
  1627. this.style.color = text_col;
  1628. lg('[CFS.colrs] RGB col ', rgb_col, '; TEXT color', text_col, '( YIQ = ', yiq, ').');
  1629. if (def(this.parentElement)) {
  1630. CFS.opts(this.parentElement.classList.item(1)
  1631. .replace(/_([a-zA-Z]+)$/, ""), rgb_col, this.id.replace(/_([a-zA-Z]+)$/, ""));
  1632. }
  1633. } else {
  1634. lg('[CFS.colrs] Sorry, RGB col is wrong.');
  1635. this.style.border = '1px solid red';
  1636. }
  1637. },
  1638. opts: function (el, val, vr) {
  1639. lg('[CFS.opts] ', el, val, vr);
  1640. var rebuild = false;
  1641. if (!def(vr)) {
  1642. if (def(CFS.conf[el])) {
  1643. if (CFS.conf[el].use !== val) {
  1644. CFS.conf[el].use = val;
  1645. rebuild = true;
  1646. }
  1647. }
  1648. } else {
  1649. lg(CFS.conf[el].vars[vr], val, CFS.conf[el].vars[vr] !== val);
  1650. if (CFS.conf[el].vars[vr] !== val) {
  1651. CFS.conf[el].vars[vr] = val;
  1652. rebuild = true;
  1653. }
  1654. }
  1655. if (rebuild) {
  1656. CFS.calc_each(el);
  1657. CFS.css_add(CFS.css_join(CFS.cl_css));
  1658. }
  1659. },
  1660. gray: function () {
  1661. var sel = this.id.replace(/_([a-zA-Z]+)$/, ""),
  1662. group = document.querySelectorAll('.' + sel + "_v");
  1663. lg('.' + sel);
  1664. if (document.querySelector('#' + sel + "_use")
  1665. .checked) {
  1666. this.classList.remove('gray');
  1667. Array.prototype.forEach.call(group, function (el) {
  1668. el.classList.remove('gray');
  1669. });
  1670. } else {
  1671. this.classList.add('gray');
  1672. Array.prototype.forEach.call(group, function (el) {
  1673. el.classList.add('gray');
  1674. });
  1675. }
  1676. CFS.opts(sel, document.querySelector('#' + sel + "_use")
  1677. .checked);
  1678. },
  1679. blur: function () {
  1680. if (def(this.parentElement)) {
  1681. CFS.opts(this.parentElement.classList.item(1).replace(/_([a-zA-Z]+)$/, ""),
  1682. this.value, this.id.replace(/_([a-zA-Z]+)$/, ""));
  1683. }
  1684. },
  1685. font_blur: function () {
  1686. this.style.fontFamily = this.value;
  1687. CFS.blur.call(this);
  1688. },
  1689. cr_el: function (type, par, clas, id, val) {
  1690. var el = document.createElement(type);
  1691. el.className = clas || '';
  1692. id = id || '';
  1693. val = val || '';
  1694. el.id = id;
  1695. switch (el.classList.item(0)) {
  1696. case 'opt':
  1697. el.onclick = CFS.gray;
  1698. break;
  1699. case 'lb':
  1700. el.innerHTML = val;
  1701. el.htmlFor = val + '_use';
  1702. break;
  1703. case 'cb':
  1704. el.type = 'checkbox';
  1705. el.checked = val;
  1706. el.onblur = CFS.opts;
  1707. break;
  1708. case 'text':
  1709. el.innerHTML = val;
  1710. break;
  1711. case 'vr':
  1712. if (id === 'my_css_vr') {
  1713. // el.innerHTML = val;
  1714. el.value = val;
  1715. el.rows = 5;
  1716. el.cols = 15;
  1717. } else {
  1718. el.type = 'text';
  1719. el.value = val;
  1720. }
  1721. if (id.indexOf('color_vr') > -1) {
  1722. el.onblur = this.colrs;
  1723. CFS.colrs.call(el);
  1724. } else if (id.indexOf('font_vr') > -1) {
  1725. el.onblur = CFS.font_blur;
  1726. CFS.font_blur.call(el);
  1727. } else {
  1728. el.onblur = CFS.blur;
  1729. }
  1730. break;
  1731. case 'bt':
  1732. el.type = 'button';
  1733. el.value = id;
  1734. el.id = 'cfs_' + id;
  1735. el.onclick = val;
  1736. break;
  1737. case 'tg':
  1738. el.id = 'cfs_toggle';
  1739. el.classList.add('pageAction');
  1740. el.setAttribute('data-page-action', 'CFS');
  1741. el.innerHTML = id;
  1742. el.onclick = CFS.togw_wind;
  1743. break;
  1744. }
  1745. if (clas !== 'tg') {
  1746. par.appendChild(el);
  1747. } else {
  1748. par.insertBefore(el, par.firstChild);
  1749. }
  1750. return el;
  1751. } /** CFS window END **/
  1752. };
  1753. setTimeout(CFS.init, 500);
  1754. }(window));