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...

当前为 2016-05-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @author Dexmaster
  3. // @date 2016-05-30
  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.1.0
  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.1.0</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. cards_view_fix: {
  997. use: true,
  998. vars: {
  999. card_width: "182px"
  1000. },
  1001. 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 )'
  1002. },
  1003. titles_fix: {
  1004. use: true,
  1005. vars: {},
  1006. text: 'Title overflow fix *(fixing problem of overflowins of titles and texts, and wrapping every object inside a feed to stay inside)'
  1007. },
  1008. page_proportions_fixes: {
  1009. use: true,
  1010. vars: {},
  1011. text: 'Page and side area proportions fix *(fixing proportions to Full Article and Magazine Views, to 68% and 66% of page)'
  1012. },
  1013. wiki_widget_fix: {
  1014. use: true,
  1015. vars: {},
  1016. text: 'WikiWidget in Article View Fix *(fixing a problem with WikiWidget in Article View)'
  1017. },
  1018. title_view_fix: {
  1019. use: true,
  1020. vars: {},
  1021. text: 'Title View fix *(restyling Title View and sliming out titles and summaries)'
  1022. },
  1023. some_cleaning: {
  1024. use: true,
  1025. vars: {
  1026. art_padding: "15px",
  1027. art_color: '#f9f9f9',
  1028. art_marg_top: '10px',
  1029. art_marg_bot: '10px'
  1030. },
  1031. text: 'Some cleaning *(variables: art - Full Article View, art_color - Full Article View Feed background, art_marg_* - Full Article top/bottom margines)'
  1032. },
  1033. remove_breaks: {
  1034. use: false,
  1035. vars: {},
  1036. text: 'Remove &lt;br&gt; from paragraphs'
  1037. },
  1038. share_feed_fix: {
  1039. use: true,
  1040. vars: {},
  1041. text: 'SocialIcons in LifeHacker posts'
  1042. },
  1043. hotkeys: {
  1044. use: true,
  1045. vars: {},
  1046. 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 ;'
  1047. },
  1048. hide_left_menu: {
  1049. use: false,
  1050. vars: {},
  1051. text: 'Hide left menu entirely (also "U" hotkey), needs hotkeys option on to use hotkey :)'
  1052. },
  1053. use_full_width: {
  1054. use: false,
  1055. vars: {},
  1056. text: 'Hide Side Areas in Article and Magazine Views *(use 100% of Right Panel not some proportions)'
  1057. },
  1058. colors: {
  1059. use: true,
  1060. vars: {
  1061. action_color: '#82BD1A',
  1062. h1_color: '#000',
  1063. h2_color: '#36C',
  1064. unread_color: '#36C',
  1065. read_color: '#666',
  1066. summary_color: '#999',
  1067. tview_color: '#777'
  1068. },
  1069. 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)'
  1070. },
  1071. background_colors: {
  1072. use: true,
  1073. vars: {
  1074. condtools_color: '#FFF',
  1075. select_color: '#FFFEEE',
  1076. hover_color: '#F5F5FE'
  1077. },
  1078. text: 'Background colors *(variables: condtools_color - Condensed Tools background color, select_color - Selected Feed background color, hover_color - Hover Feed background color)'
  1079. },
  1080. left_menu_colors: {
  1081. use: true,
  1082. vars: {
  1083. ltext_color: '#444',
  1084. dtext_color: '#AAA',
  1085. lsel_color: '#000',
  1086. dsel_color: '#FFF',
  1087. lcount_color: '#444',
  1088. lselcount_color: '#000',
  1089. dcount_color: '#888',
  1090. dselcount_color: '#FFF',
  1091. lnempty_color: '#555',
  1092. dnempty_color: '#DDD'
  1093. },
  1094. text: 'Left Menu colors (variable parts meanings:"l|d" - Ligh/Dark theme, "sel" - selected, "count" - counter, "nempty" - nonEmpty Category)'
  1095. },
  1096. rside_colors: {
  1097. use: true,
  1098. vars: {
  1099. recom_color: "#3498DB"
  1100. },
  1101. text: 'Right Side colors, for now "recom_color" - recommendations color'
  1102. },
  1103. compact_title_view: {
  1104. use: false,
  1105. vars: {},
  1106. text: 'Even more Slim Title View and fix for Compact View option in Preferences'
  1107. },
  1108. slim_condensed_tools: {
  1109. use: false,
  1110. vars: {},
  1111. text: 'Slim Condensed Tools *(Even more slim Condensed Tools for small screens)'
  1112. },
  1113. some_new_stuff: {
  1114. use: true,
  1115. vars: {},
  1116. text: 'Just some additional stuff :)'
  1117. },
  1118. mark_all_fix: {
  1119. use: true,
  1120. vars: {
  1121. mark_all_b_color: '#FFFFFF',
  1122. mark_all_b_hov_color: '#111111',
  1123. mark_all_back_color: '#3498DB',
  1124. mark_all_back_hov_color: '#3498DB',
  1125. mark_all_st_color: '#EFEFEF',
  1126. mark_all_st_hov_color: '#EFEFEF'
  1127. },
  1128. text: 'Changes in Mark All As Read button (suggested by fajfka)'
  1129. },
  1130. fixed_preview: {
  1131. use: true,
  1132. vars: {},
  1133. text: 'Fixed preview in Cards View (suggested by avist)'
  1134. },
  1135. hide_ads: {
  1136. use: false,
  1137. vars: {},
  1138. text: 'Remove some ads'
  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: 'body.home{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. 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;}',
  1154. 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;}',
  1155. 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%;}',
  1156. 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;}',
  1157. 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}',
  1158. 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: 0;}#feedlyTabs > div:last-child{margin-bottom: 0 !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: 183px; position: fixed; left: 0px; bottom: 0px;}',
  1159. remove_breaks: '.content br{display: none !important;}',
  1160. share_feed_fix: '.u100Entry > .entryBody > .content > div > table > tbody > tr > td > a > img{display: inline !important;max-width: 20px !important;width: 20px !important;}',
  1161. hotkeys: '/** Hotkeys CSS **/',
  1162. 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;}',
  1163. 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;}',
  1164. 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;}',
  1165. 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;}',
  1166. 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;}',
  1167. rside_colors: '.nbrRecommendations{color: %recom_color !important;}',
  1168. 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;}',
  1169. slim_condensed_tools: '.u0Entry .condensedTools a,.u0Entry .condensedTools img{margin: 0 -6px;}.u0Entry .lastModified{max-width: 30px;}',
  1170. 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;}',
  1171. 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}',
  1172. 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
  1173. hide_ads: '#feedlyTabs .fx-button.primary.small, #feedlyTabs .fx-button.primary.small ~ a, #feedlyProBar, .promo{display:none !important;}',
  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. };
  1183. /** fix_GMes for any browser **/
  1184. CFS.fix_GM = function () {
  1185. var gmCh = false;
  1186. try {
  1187. lg('[CFS.fix_GM]: Started GM_ functional fixes');
  1188. GM_setValue("gmCh", true);
  1189. gmCh = GM_getValue("gmCh");
  1190. } catch (ignore) {}
  1191. if (gmCh) {
  1192. CFS.getValue = GM_getValue;
  1193. CFS.setValue = GM_setValue;
  1194. CFS.deleteValue = GM_deleteValue;
  1195. lg('[CFS.fix_GM]: No need to Fix GM_ get/set/delete Value');
  1196. } else {
  1197. CFS.getValue = function (key, def) {
  1198. return localStorage[key] || def;
  1199. };
  1200. CFS.setValue = function (key, value) {
  1201. localStorage[key] = value;
  1202. return localStorage[key] === value;
  1203. };
  1204. CFS.deleteValue = function (key) {
  1205. delete localStorage[key];
  1206. return;
  1207. };
  1208. lg('[CFS.fix_GM]: Fixed GM_ get/set/delete Value');
  1209. }
  1210. lg('[CFS.fix_GM]: Finished GM_ functional fixes');
  1211. };
  1212. CFS.init = function () {
  1213. if (CFS.ini) {
  1214. return false;
  1215. }
  1216. CFS.ini = true;
  1217. lg('[CFS.init]: Script Initialized');
  1218. CFS.fix_GM();
  1219. CFS.initconf(RES);
  1220. CFS.calc_css();
  1221. document.body.addEventListener("DOMNodeInserted", CFS.add_tog);
  1222. lg('[CFS.init]: CFS.add_tog on body insert');
  1223. };
  1224. CFS.initconf = function (RES) {
  1225. if (!!RES) {
  1226. CFS.conf = JSON.parse(JSON.stringify(CFS.conf_def));
  1227. } else {
  1228. CFS.conf = JSON.parse(decodeURI(CFS.getValue('conf', encodeURI(JSON.stringify(CFS.conf_def)))));
  1229. }
  1230. lg('[CFS.initconf]: Settings init //conf'); //conf= ', JSON.stringify(CFS.conf));
  1231. };
  1232. CFS.calc_css = function () {
  1233. if (CFS.cl_ini) {
  1234. return false;
  1235. }
  1236. CFS.cl_ini = true;
  1237. lg('[CFS.calc_css]: Calculation Started');
  1238. Object.keys(CFS.conf_def)
  1239. .forEach(function (key) {
  1240. CFS.calc_each(key);
  1241. });
  1242. lg('[CFS.calc_css]: Calculation Finished');
  1243. };
  1244. CFS.calc_each = function (key) {
  1245. if (!def(CFS.conf[key])) {
  1246. CFS.conf[key] = CFS.conf_def[key];
  1247. }
  1248. lg('[CFS.calc_each]: Adding ' + key);
  1249. if (CFS.conf[key].use) {
  1250. CFS.cl_css[key] = CFS.css_vars(CFS.css[key], CFS.conf_def[key].vars, CFS.conf[key].vars);
  1251. lg('[CFS.calc_each]: Added ', key, ' CSS');
  1252. } else {
  1253. CFS.cl_css[key] = '';
  1254. lg('[CFS.calc_each]: Missing ', key, ' CSS');
  1255. }
  1256. };
  1257. CFS.css_vars = function (css, vars, vars2) {
  1258. Object.keys(vars)
  1259. .forEach(function (key2) {
  1260. if (!def(vars2)) {
  1261. vars2 = vars;
  1262. }
  1263. if (key2.length > 0) {
  1264. if (!def(vars2[key2])) {
  1265. vars2[key2] = vars[key2];
  1266. }
  1267. lg('[CFS.calc_css]: Replacing variable ', key2, ' CSS');
  1268. css = CFS.str_mask(css, key2, vars2[key2]);
  1269. }
  1270. });
  1271. return css;
  1272. };
  1273. CFS.str_mask = function (str, mask, data) {
  1274. return str.split('%' + mask)
  1275. .join(data);
  1276. };
  1277. CFS.open_tab = function (url, back) {
  1278. /** back - background_tab flag, tried more universal approach, but hasn't been tested **/
  1279. if (back) {
  1280. var browser = 'Dunno',
  1281. el, evt, res = false;
  1282. //if (is(CFS.openInTab)){ // SH*Ts chrome and other browsers
  1283. 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 )**/
  1284. browser = 'Firefox!';
  1285. res = GM_openInTab(url, true);
  1286. } else {
  1287. el = document.createElement("a");
  1288. el.href = url;
  1289. 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 )**/
  1290. evt = document.createEvent("MouseEvents");
  1291. browser = 'Chrome/Opera/?Safari?/?IE10+?!';
  1292. evt.initMouseEvent("click", true, true, w, 0, 0, 0, 0, 0, true, false, false, false, 0, null); // ctrl+left button
  1293. res = el.dispatchEvent(evt);
  1294. } else if (document.createEventObject) { /** ?IE9-? *( if you'd found some problems please report to Script Discussion section https://userscripts.org/scripts/discuss/171749 )**/
  1295. evt = document.createEventObject();
  1296. evt.ctrlKey = true;
  1297. evt.button = 1; // ctrl+left button
  1298. browser = 'IE < 9!';
  1299. res = el.fireEvent("onclick", evt);
  1300. }
  1301. }
  1302. lg('[CFS.open_tab]: ', res ? 'Opened "' : 'Forbidden to open "', url, '" (in ', browser, ') ', back ? 'new background' : 'new', ' tab ');
  1303. } else {
  1304. w.open(url);
  1305. }
  1306. };
  1307. CFS.key_ch_right = function (evt) {
  1308. lg2('[CFS.key_ch_right] Proceed!');
  1309. CFS.key_check(evt, true);
  1310. };
  1311. CFS.key_ch_left = function (evt) {
  1312. lg2('[CFS.key_ch_left] Proceed!');
  1313. CFS.key_check(evt, false);
  1314. };
  1315. CFS.key_ch_doc = function (evt) {
  1316. lg2('[CFS.key_ch_doc] Proceed!');
  1317. CFS.key_check(evt, true);
  1318. };
  1319. CFS.key_check = function (evt, right) {
  1320. var el = null,
  1321. all_lbls = [],
  1322. non_emp_lbls = [],
  1323. index_all, index_non_emp, key_char, pt = document.location.pathname;
  1324. evt = evt || w.event;
  1325.  
  1326. key_char = String.fromCharCode(evt.keyCode || evt.CharCode);
  1327.  
  1328. lg2('[CFS.key_check]On ', right ? 'Right' : 'Left', ' Panel, key_char -', key_char, '- was pressed! Shift:', evt.shiftKey ? 'Pressed' :
  1329. 'Not Pressed', ', Ctrl:', evt.ctrlKey ? 'Pressed' : 'Not Pressed', ', Alt:', evt.altKey ? 'Pressed' : 'Not Pressed', ', CharCode:', key_char.charCodeAt(0), '.');
  1330.  
  1331. if (evt.ctrlKey || evt.altKey || evt.metaKey) {
  1332. return false;
  1333. }
  1334.  
  1335. if ((key_char.charCodeAt(0) < 30) || (key_char.charCodeAt(0) > 111)) {
  1336. return false;
  1337. }
  1338.  
  1339. if ((!right) && (!document.querySelector('#navSelector_my')
  1340. .classList.contains('selected'))) {
  1341. return false;
  1342. }
  1343.  
  1344.  
  1345. if (document.querySelector('#feedlyTabs > div:last-child .header.target.selected') !== null) {
  1346. el = document.querySelector('#feedlyTabs > div:last-child .header.target.selected .label');
  1347. all_lbls = Array.prototype.slice.call(document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label'));
  1348. index_all = all_lbls.indexOf(el);
  1349. } else {
  1350. if (document.querySelector('#feedlyTabs > div:last-child .header.target') !== null) {
  1351. if (pt.indexOf("/i/") > -1) {
  1352. pt = pt.substring(3);
  1353. }
  1354. el = document.querySelector('#feedlyTabs > div:last-child .header.target[data-selector-target="' + pt + '"] .label');
  1355. all_lbls = Array.prototype.slice.call(document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label'));
  1356. index_all = all_lbls.indexOf(el);
  1357. }
  1358. }
  1359. if (el === null) {
  1360. el = document.querySelector('#feedlyTabs > div:last-child .header.target .label');
  1361. }
  1362. if (document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label.nonEmpty') !== null) {
  1363. non_emp_lbls = Array.prototype.slice.call(document.querySelectorAll('#feedlyTabs > div:last-child > .tab .header.target .label.nonEmpty'));
  1364. index_non_emp = non_emp_lbls.indexOf(el);
  1365. //if((index_non_emp <0) &&(non_emp_lbls.length>0)) index_non_emp = 0;
  1366. }
  1367. 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);
  1368. switch (key_char) {
  1369. case 'H':
  1370. if ((document.querySelector('.selectedEntry .title') !== null) && (!evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1371. CFS.open_tab(document.querySelector('.selectedEntry .title').href, true); //open new background tab
  1372. }
  1373. break;
  1374. case 'L':
  1375. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1376. if (non_emp_lbls.length > 1) {
  1377. if (index_non_emp <= 0) {
  1378. index_non_emp = non_emp_lbls.length - 1;
  1379. } else {
  1380. index_non_emp -= 1;
  1381. }
  1382. lg('[CFS.key_check] Shift+L Pressed (', index_non_emp, non_emp_lbls[index_non_emp], ')');
  1383. non_emp_lbls[index_non_emp].click();
  1384. }
  1385. }
  1386. break;
  1387. case ';':
  1388. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1389. if (non_emp_lbls.length > 1) {
  1390. if (index_non_emp >= non_emp_lbls.length - 1) {
  1391. index_non_emp = 0;
  1392. } else {
  1393. index_non_emp += 1;
  1394. }
  1395. lg('[CFS.key_check] Shift+; Pressed (', index_non_emp, non_emp_lbls[index_non_emp], ')');
  1396. non_emp_lbls[index_non_emp].click();
  1397. }
  1398. }
  1399. break;
  1400. case 'O':
  1401. if ((evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1402. lg('[CFS.key_check] Shift+O Pressed (Pin/Unpin Left Menu)');
  1403. CFS.pin();
  1404. }
  1405. break;
  1406. case 'P':
  1407. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1408. if (all_lbls.length > 1) {
  1409. if (index_all <= 0) {
  1410. index_all = all_lbls.length - 1;
  1411. } else {
  1412. index_all -= 1;
  1413. }
  1414. lg('[CFS.key_check] Shift+P Pressed (', index_all, all_lbls[index_all], ')');
  1415. all_lbls[index_all].click();
  1416. }
  1417. }
  1418. break;
  1419. case 'N':
  1420. if ((el !== null) && (evt.shiftKey) && (!evt.ctrlKey) && (!evt.altKey)) {
  1421. if (all_lbls.length > 1) {
  1422. if (index_all >= all_lbls.length - 1) {
  1423. index_all = 0;
  1424. } else {
  1425. index_all += 1;
  1426. }
  1427. lg('[CFS.key_check] Shift+N Pressed (', index_all, all_lbls[index_all], ')');
  1428. all_lbls[index_all].click();
  1429. }
  1430. }
  1431. break;
  1432. case 'U':
  1433. if ((!evt.ctrlKey) && (!evt.altKey)) {
  1434. if (!evt.shiftKey) {
  1435. document.querySelector('#hide_left_menu_lb')
  1436. .click();
  1437. } else {
  1438. document.querySelector('#use_full_width_lb')
  1439. .click();
  1440. }
  1441. }
  1442. break;
  1443. case 'T':
  1444. if ((!evt.ctrlKey) && (!evt.altKey)) {
  1445. if (evt.shiftKey) {
  1446. CFS.togw_wind();
  1447. }
  1448. }
  1449. break;
  1450. }
  1451. };
  1452. CFS.css_join = function (arr) {
  1453. var res = '';
  1454. Object.keys(arr)
  1455. .forEach(function (key) {
  1456. res += "/* " + key + " Begin */" + arr[key] + "/* " + key + " end */";
  1457. });
  1458. return res;
  1459. };
  1460. CFS.css_add = function (css) {
  1461. var chld = document.createElement('style'),
  1462. hds = document.getElementsByTagName('head')[0],
  1463. prnt = hds || document.documentElement;
  1464. chld.type = 'text/css';
  1465. chld.appendChild(document.createTextNode(css));
  1466. if (def(CFS.css_el)) {
  1467. CFS.css_el.parentElement.removeChild(CFS.css_el);
  1468. }
  1469. CFS.css_el = hds ? prnt.appendChild(chld) : prnt.insertBefore(chld, prnt.firstChild);
  1470. };
  1471. /** CFS window BEGIN **/
  1472. CFS.w_show = false;
  1473. CFS.w_wind = '';
  1474. CFS.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-wrap{display: flex;white-space: nowrap;position: relative;}.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;overflow:auto;}.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:-35px;display:none;position:absolute;right:0;width:auto;max-height:32px;left:50%;white-space:normal;overflow:hidden;}.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}';
  1475. CFS.togw_wind = function () {
  1476. document.querySelector('.CFS_conf')
  1477. .classList.toggle('shown');
  1478. document.querySelector('#feedlyPageHeader .tg')
  1479. .classList.toggle('selected');
  1480. document.querySelector('#floatingBar .tg')
  1481. .classList.toggle('selected');
  1482. CFS.w_show = !CFS.w_show;
  1483. };
  1484. CFS.wind_ini = function () {
  1485. if (CFS.cl_css !== '') {
  1486. //lg('[CFS.wind_ini]: ',CFS.cl_css);
  1487. CFS.cl_css.w_css = CFS.w_css;
  1488. CFS.css_add(CFS.css_join(CFS.cl_css));
  1489. lg('[CFS.wind_ini]: CFS.cl_css Added');
  1490. lg('[CFS.wind_ini]: Added ws style w_css');
  1491. }
  1492. CFS.w_wind = CFS.cr_el('div', document.body, 'CFS_conf');
  1493. lg('[CFS.wind_ini]: Added cfsw_wind');
  1494. var selsWrap = CFS.cr_el('div', CFS.w_wind, 'sels-wrap'),
  1495. sels = CFS.cr_el('div', selsWrap, 'sels'),
  1496. opts = CFS.cr_el('div', sels, 'opts'),
  1497. vars = CFS.cr_el('div', sels, 'vars'),
  1498. vars2 = CFS.cr_el('div', sels, 'vars'),
  1499. count = 0,
  1500. btns = CFS.cr_el('div', CFS.w_wind, 'btns'); /* , info =*/
  1501. CFS.cr_el('div', CFS.w_wind, 'text info', 'CFS_info', CFS_info);
  1502. Object.keys(CFS.conf_def)
  1503. .forEach(function (key) {
  1504. lg('[CFS.wind_ini]: ', key, what(CFS.conf[key]));
  1505. if (!def(CFS.conf[key])) {
  1506. CFS.conf[key] = CFS.conf_def[key];
  1507. }
  1508. var opt = CFS.cr_el('div', opts, 'opt', key + '_opt');
  1509. if (!CFS.conf[key].use) {
  1510. opt.classList.add('gray');
  1511. }
  1512. CFS.cr_el('input', opt, 'cb', key + '_use', CFS.conf[key].use);
  1513. CFS.cr_el('label', opt, 'lb', key + '_lb', key);
  1514. CFS.cr_el('div', opt, 'text', key + '_text', CFS.conf_def[key].text);
  1515. lg('[CFS.wind_ini]: Added option ', key);
  1516. lg('1' + key);
  1517. Object.keys(CFS.conf_def[key].vars)
  1518. .forEach(function (key2) {
  1519. lg('2' + key + key2);
  1520. if (is(CFS.conf[key].vars[key2], 'undefined')) {
  1521. CFS.conf[key].vars[key2] = CFS.conf_def[key].vars[key2];
  1522. }
  1523. lg('3' + key + key2);
  1524. count += 1;
  1525. var varo = CFS.cr_el('div', (count < 20) ? vars : vars2, 'varo ' + key + '_v', key2 + '_varo'),
  1526. inp = 'input';
  1527. if (!CFS.conf[key].use) {
  1528. varo.classList.add('gray');
  1529. }
  1530. lg('4' + key + key2);
  1531. if (key2 === 'my_css') {
  1532. inp = 'textarea';
  1533. }
  1534.  
  1535. CFS.cr_el(inp, varo, 'vr', key2 + '_vr', CFS.conf[key].vars[key2]);
  1536. lg(inp, varo, 'vr', key2 + '_vr', CFS.conf[key].vars[key2]);
  1537. CFS.cr_el('div', varo, 'lb', key2 + '_lb', key2 + ' *(' + key + ')');
  1538. lg('div', varo, 'lb', key2 + '_lb', key2 + ' *(' + key + ')');
  1539. lg('[CFS.wind_ini]: Added var ', key2);
  1540. lg('5' + key + key2);
  1541. });
  1542. });
  1543. CFS.cr_el('input', btns, 'bt', 'save', CFS.saveconf);
  1544. CFS.cr_el('input', btns, 'bt', 'load', CFS.resconf);
  1545. CFS.cr_el('input', btns, 'bt', 'default', CFS.defconf);
  1546. CFS.cr_el('input', btns, 'bt', 'pin', CFS.pin);
  1547. /*
  1548. CFS.cr_el('input', btns, 'bt', 'import', CFS.re_imp);
  1549. CFS.cr_el('input', btns, 'bt', 'export', CFS.re_exp);
  1550. */
  1551. CFS.cr_el('input', btns, 'bt', 'close', CFS.togw_wind);
  1552. lg('[CFS.wind_ini]: Added buttons! ');
  1553. lg('[CFS.wind_ini]: Added info! ');
  1554. CFS.cr_el('div', document.querySelector('#feedlyPageHeader .pageActionBar'), 'tg', 'CFS');
  1555. CFS.cr_el('div', document.querySelector('#floatingBar .pageActionBar'), 'tg', 'CFS');
  1556. lg('[CFS.wind_ini]: Added toggles! ');
  1557. if (CFS.conf.hotkeys.use) {
  1558. /*document.querySelector('#mainBar')
  1559. .onkeyup = CFS.key_ch_right;
  1560. document.querySelector('#feedlyTabsHolder')
  1561. .onkeyup = CFS.key_ch_left;*/
  1562. document.onkeyup = CFS.key_ch_doc;
  1563. //window.onkeyup = CFS.key_check;
  1564. }
  1565. };
  1566. CFS.add_tog = function () {
  1567. document.body.removeEventListener("DOMNodeInserted", CFS.add_tog);
  1568. lg('[CFS.add_tog]: Trying to initialize! ');
  1569. if ((document.querySelector('#floatingBar') === null) || (document.title === "welcome to feedly")) {
  1570. lg('[CFS.add_tog]: Absent floatingBar! ');
  1571. setTimeout(CFS.add_tog, 500);
  1572. } else {
  1573. lg('[CFS.add_tog]: Present floatingBar! ');
  1574. CFS.wind_ini();
  1575. }
  1576. };
  1577. CFS.pin = function () {
  1578. var tb_hld = document.querySelector('#feedlyTabsHolder'),
  1579. unp_bt = document.querySelector('#feedlyTabsUnpin'),
  1580. pin_bt = document.querySelector('#feedlyTabsPin');
  1581. if (!!tb_hld) {
  1582. if (!!tb_hld.classList) {
  1583. if (tb_hld.classList.contains('pinned')) {
  1584. if (!!unp_bt) {
  1585. unp_bt.click();
  1586. lg('[CFS.pin] Unpinned Left Panel');
  1587. } else {
  1588. lg('[CFS.pin] Error Unpin Button not found!');
  1589. }
  1590. } else {
  1591. if (!!pin_bt) {
  1592. pin_bt.click();
  1593. lg('[CFS.pin] Pinned Left Panel');
  1594. } else {
  1595. lg('[CFS.pin] Error Pin Button not found!');
  1596. }
  1597. }
  1598. }
  1599. }
  1600. };
  1601. CFS.re_imp = function () {
  1602. lg('[CFS.re_imp] ' + (JSON.stringify(CFS.conf)));
  1603. };
  1604. CFS.re_exp = function () {
  1605. lg('[CFS.re_exp] ' + (JSON.stringify(CFS.conf_def)));
  1606. };
  1607. CFS.defconf = function () {
  1608. delete CFS.conf;
  1609. lg('[CFS.delconf] Deleting');
  1610. CFS.resconf(true);
  1611. };
  1612. CFS.resconf = function (RES) {
  1613. var rebuild = false;
  1614. lg('[CFS.resconf] Loading (Reseting?', is(RES, 'boolean'), ')');
  1615. CFS.initconf(is(RES, 'boolean'));
  1616. Object.keys(CFS.conf_def)
  1617. .forEach(function (key) {
  1618. if (!def(CFS.conf[key])) {
  1619. CFS.conf[key] = CFS.conf_def[key];
  1620. }
  1621. if (CFS.conf[key].use !== document.querySelector('#' + key + '_use')
  1622. .checked) {
  1623. document.querySelector('#' + key + '_opt label')
  1624. .click();
  1625. }
  1626. Object.keys(CFS.conf_def[key].vars)
  1627. .forEach(function (key2) {
  1628. var el_key2 = document.querySelector('#' + key2 + '_vr');
  1629. if (!def(CFS.conf[key].vars)) {
  1630. CFS.conf[key].vars = CFS.conf_def[key].vars;
  1631. }
  1632. if (CFS.conf[key].vars[key2] !== el_key2
  1633. .value) {
  1634. el_key2.value = CFS.conf[key].vars[key2];
  1635. el_key2.onblur(el_key2);
  1636. rebuild = true;
  1637. }
  1638. });
  1639. if (rebuild) {
  1640. CFS.calc_each(key);
  1641. CFS.css_add(CFS.css_join(CFS.cl_css));
  1642. }
  1643. });
  1644. lg('[CFS.resconf] Applied!');
  1645. };
  1646. CFS.saveconf = function () {
  1647. CFS.deleteValue('conf');
  1648. lg('[CFS.saveconf] COnfigs : ', CFS.conf);
  1649. CFS.setValue('conf', encodeURI(JSON.stringify(CFS.conf)));
  1650. lg('[CFS.saveconf] Saved!');
  1651. };
  1652. CFS.colrs = function (el) {
  1653. var rgb, rgb_col = el.value,
  1654. text_col, yiq;
  1655. lg('[CFS.colrs]: Recieved color: ' + rgb_col);
  1656. rgb_col = name2col(rgb_col);
  1657. el.style.border = '1px solid black';
  1658. if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(rgb_col)) {
  1659. el.style.backgroundColor = rgb_col;
  1660. rgb = el.style.backgroundColor.match(/\d+/g);
  1661. yiq = ((rgb[0] * 299) + (rgb[1] * 587) + (rgb[2] * 114)) / 1000;
  1662. text_col = (yiq >= 128) ? '#000' : '#fff';
  1663. el.style.color = text_col;
  1664. lg('[CFS.colrs] RGB col ', rgb_col, '; TEXT color', text_col, '( YIQ = ', yiq, ').');
  1665. if (def(el.parentElement)) {
  1666. CFS.opts(el.parentElement.classList.item(1)
  1667. .replace(/_([a-zA-Z]+)$/, ""), rgb_col, el.id.replace(/_([a-zA-Z]+)$/, ""));
  1668. }
  1669. } else {
  1670. lg('[CFS.colrs] Sorry, RGB col is wrong.');
  1671. el.style.border = '1px solid red';
  1672. }
  1673. };
  1674. CFS.opts = function (el, val, vr) {
  1675. lg('[CFS.opts] ', el, val, vr);
  1676. var rebuild = false;
  1677. if (!def(vr)) {
  1678. if (def(CFS.conf[el])) {
  1679. if (CFS.conf[el].use !== val) {
  1680. CFS.conf[el].use = val;
  1681. rebuild = true;
  1682. }
  1683. }
  1684. } else {
  1685. lg(CFS.conf[el].vars[vr], val, CFS.conf[el].vars[vr] !== val);
  1686. if (CFS.conf[el].vars[vr] !== val) {
  1687. CFS.conf[el].vars[vr] = val;
  1688. rebuild = true;
  1689. }
  1690. }
  1691. if (rebuild) {
  1692. CFS.calc_each(el);
  1693. CFS.css_add(CFS.css_join(CFS.cl_css));
  1694. }
  1695. };
  1696. CFS.gray = function (el) {
  1697. var sel = el.id.replace(/_([a-zA-Z]+)$/, ""),
  1698. group = document.querySelectorAll('.' + sel + "_v");
  1699. lg('.' + sel);
  1700. if (document.querySelector('#' + sel + "_use")
  1701. .checked) {
  1702. el.classList.remove('gray');
  1703. Array.prototype.forEach.call(group, function (el) {
  1704. el.classList.remove('gray');
  1705. });
  1706. } else {
  1707. el.classList.add('gray');
  1708. Array.prototype.forEach.call(group, function (el) {
  1709. el.classList.add('gray');
  1710. });
  1711. }
  1712. CFS.opts(sel, document.querySelector('#' + sel + "_use")
  1713. .checked);
  1714. };
  1715. CFS.blur = function (el) {
  1716. if (def(el.parentElement)) {
  1717. CFS.opts(el.parentElement.classList.item(1).replace(/_([a-zA-Z]+)$/, ""),
  1718. el.value, el.id.replace(/_([a-zA-Z]+)$/, ""));
  1719. }
  1720. };
  1721. CFS.font_blur = function (el) {
  1722. el.style.fontFamily = el.value;
  1723. CFS.blur(el);
  1724. };
  1725. CFS.cr_el = function (type, par, clas, id, val) {
  1726. var el = document.createElement(type);
  1727. el.className = clas || '';
  1728. id = id || '';
  1729. val = val || '';
  1730. el.id = id;
  1731. switch (el.classList.item(0)) {
  1732. case 'opt':
  1733. el.onclick = function () {
  1734. return CFS.gray(el);
  1735. };
  1736. break;
  1737. case 'lb':
  1738. el.innerHTML = val;
  1739. el.htmlFor = val + '_use';
  1740. break;
  1741. case 'cb':
  1742. el.type = 'checkbox';
  1743. el.checked = val;
  1744. el.onblur = CFS.opts;
  1745. break;
  1746. case 'text':
  1747. el.innerHTML = val;
  1748. break;
  1749. case 'vr':
  1750. if (id === 'my_css_vr') {
  1751. // el.innerHTML = val;
  1752. el.value = val;
  1753. el.rows = 5;
  1754. el.cols = 15;
  1755. } else {
  1756. el.type = 'text';
  1757. el.value = val;
  1758. }
  1759. if (id.indexOf('color_vr') > -1) {
  1760. el.onblur = function () {
  1761. return CFS.colrs(el);
  1762. };
  1763. el.onblur();
  1764. } else if (id.indexOf('font_vr') > -1) {
  1765. el.onblur = function () {
  1766. return CFS.font_blur(el);
  1767. };
  1768. el.onblur();
  1769. } else {
  1770. el.onblur = function () {
  1771. return CFS.blur(el);
  1772. };
  1773. }
  1774. break;
  1775. case 'bt':
  1776. el.type = 'button';
  1777. el.value = id;
  1778. el.id = 'cfs_' + id;
  1779. el.onclick = val;
  1780. break;
  1781. case 'tg':
  1782. el.id = 'cfs_toggle';
  1783. el.classList.add('pageAction');
  1784. el.setAttribute('data-page-action', 'CFS');
  1785. el.innerHTML = id;
  1786. el.onclick = CFS.togw_wind;
  1787. break;
  1788. }
  1789. if (clas !== 'tg') {
  1790. par.appendChild(el);
  1791. } else {
  1792. par.insertBefore(el, par.firstChild);
  1793. }
  1794. return el;
  1795. }; /** CFS window END **/
  1796. setTimeout(CFS.init, 500);
  1797. }(window));