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-10-18 提交的版本,查看 最新版本

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