├── test ├── ui.js ├── options.js ├── server │ ├── .jshintrc │ ├── run.js │ └── server.js ├── irc-styles.js ├── .jshintrc ├── qwebirc.js ├── Elements.from.js └── test-runner.html ├── templates ├── nickmenubtn.hbs ├── channelName.hbs ├── failed-validator.hbs ├── topicText.hbs ├── ircTab.hbs ├── menubtn.hbs ├── status.hbs ├── loadingPage.hbs ├── qwebirc-layout.hbs ├── window-container.hbs ├── userlink.hbs ├── ircstyle.hbs ├── nickbtn.hbs ├── customlink.hbs ├── menuitem.hbs ├── ircMessage.hbs ├── ircnick.hbs ├── image-popover.hbs ├── navbar.hbs ├── detachedWindow.hbs ├── window.hbs ├── ircInput.hbs ├── amd │ ├── popup-alert.hbs │ ├── popup-dialog.hbs │ └── welcome-pane.hbs ├── mainmenu.hbs ├── nickMenu.hbs └── authpage.hbs ├── images ├── hs.png ├── hv.png ├── arrow.gif ├── cross.gif ├── icon.png ├── favicon.png ├── loading.gif ├── empty_favicon.ico ├── qwebircsmall.png ├── b_background_sel.gif ├── b_background_sel2.gif ├── b_background_unsel.gif ├── ui-icons_222222_256x240.png ├── ui-icons_2e83ff_256x240.png ├── ui-icons_454545_256x240.png ├── ui-icons_888888_256x240.png └── ui-icons_cd0a0a_256x240.png ├── sound ├── beep.mp3 ├── beep.ogg ├── beep.wav ├── smb_coin.mp3 ├── smb_coin.ogg ├── smb_coin.wav ├── smb_kick.mp3 ├── smb_kick.ogg ├── smb_kick.wav ├── smb_pause.mp3 ├── smb_pause.ogg ├── smb_pause.wav ├── smw_stomp.mp3 ├── smw_stomp.ogg ├── smw_stomp.wav ├── smb3_fireball.mp3 ├── smb3_fireball.ogg ├── smb3_fireball.wav ├── smw_spring_jump.mp3 ├── smw_spring_jump.ogg ├── smw_spring_jump.wav ├── smb3_frog_mario_walk.mp3 ├── smb3_frog_mario_walk.ogg ├── smb3_frog_mario_walk.wav └── readme.md ├── font ├── entypo.eot ├── entypo.ttf ├── entypo.woff └── entypo.css ├── swf ├── WebSocketMain.swf ├── soundmanager2.swf ├── soundmanager2_debug.swf └── soundmanager2_flash9.swf ├── mcss ├── Readme.md └── qui-modifiable-css.hbs ├── lang ├── panes │ ├── options │ │ ├── en-US.json │ │ └── base.json │ ├── channels │ │ └── base.json │ └── welcome │ │ └── base.json └── Readme.md ├── .travis.yml ├── less ├── qwebirc │ ├── image-popover.less │ ├── variables.less │ ├── input.less │ ├── loginbox.less │ ├── detached-window.less │ ├── irc-op-status.less │ ├── panels.less │ ├── tabbar.less │ ├── core.less │ ├── bootstrap-theme.less │ └── irc-colours.less ├── .csslintrc ├── qwebirc.less ├── twbs │ ├── component-animations.less │ ├── wells.less │ ├── breadcrumbs.less │ ├── close.less │ ├── thumbnails.less │ ├── utilities.less │ ├── jumbotron.less │ ├── media.less │ ├── pager.less │ ├── badges.less │ ├── labels.less │ ├── code.less │ ├── alerts.less │ ├── grid.less │ ├── progress-bars.less │ ├── print.less │ ├── pagination.less │ ├── responsive-utilities.less │ ├── tooltip.less │ ├── scaffolding.less │ ├── list-group.less │ ├── popovers.less │ └── modals.less └── bootstrap.less ├── panes ├── feedback.hbs ├── partials │ ├── channel-list-content.hbs │ └── customNotice.hbs ├── wizard.hbs ├── faq.hbs ├── channel-list.hbs ├── privacypolicy.hbs └── about.hbs ├── js ├── src │ ├── ui │ │ ├── panes │ │ │ ├── faq.js │ │ │ ├── wizard.js │ │ │ ├── feedback.js │ │ │ ├── PrivacyPolicy.js │ │ │ ├── about.js │ │ │ ├── ToggleDesktopNotifications.js │ │ │ ├── welcome.js │ │ │ ├── PanelView.js │ │ │ └── ChannelList.js │ │ ├── sounds.js │ │ ├── window │ │ │ └── IDetachable.js │ │ └── interfaces │ │ │ ├── IUIOptions.js │ │ │ └── IKeyboard.js │ ├── config │ │ ├── irc-mode-status.js │ │ ├── registeredCTCP.js │ │ ├── settings.js │ │ ├── commands.js │ │ └── theme-templates.js │ ├── ready.js │ ├── irc │ │ ├── CommandHistory.js │ │ ├── IRC_Error.js │ │ └── irc_Whois.js │ ├── constants │ │ ├── constants.js │ │ └── irc_lowertable.js │ ├── util │ │ ├── lang.js │ │ └── IRCProcessors.js │ ├── qwebirc.js │ ├── components │ │ ├── Asset.js │ │ ├── ImagePopover.js │ │ └── AutoScroll.js │ └── Interface.js ├── libs │ ├── Epitome │ │ ├── 3epitome-isequal.js │ │ ├── 2epitome.js │ │ ├── epitome-model-storage.js │ │ └── unused │ │ │ └── epitome-collection-sync.js │ ├── console-shim.js │ ├── .jshintrc │ ├── Elements.from.js │ ├── underscore-mixin.js │ └── Storage.js └── modules │ └── respond.js ├── .editorconfig ├── .gitignore ├── licence.lic ├── configure ├── config.js └── index.tmpl ├── .jshintrc ├── package.json ├── app-config.yml └── README.md /test/ui.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/options.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/nickmenubtn.hbs: -------------------------------------------------------------------------------- 1 |
  • {{text}}
  • -------------------------------------------------------------------------------- /test/server/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true 3 | } -------------------------------------------------------------------------------- /templates/channelName.hbs: -------------------------------------------------------------------------------- 1 |
    {{{channel}}}
    -------------------------------------------------------------------------------- /templates/failed-validator.hbs: -------------------------------------------------------------------------------- 1 |

    {{description}}

    -------------------------------------------------------------------------------- /templates/topicText.hbs: -------------------------------------------------------------------------------- 1 | [{{{topic}}}] -------------------------------------------------------------------------------- /images/hs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/hs.png -------------------------------------------------------------------------------- /images/hv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/hv.png -------------------------------------------------------------------------------- /sound/beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/beep.mp3 -------------------------------------------------------------------------------- /sound/beep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/beep.ogg -------------------------------------------------------------------------------- /sound/beep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/beep.wav -------------------------------------------------------------------------------- /test/irc-styles.js: -------------------------------------------------------------------------------- 1 | // see https://github.com/megawac/irc-style-parser/blob/master/test 2 | -------------------------------------------------------------------------------- /font/entypo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/font/entypo.eot -------------------------------------------------------------------------------- /font/entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/font/entypo.ttf -------------------------------------------------------------------------------- /font/entypo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/font/entypo.woff -------------------------------------------------------------------------------- /images/arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/arrow.gif -------------------------------------------------------------------------------- /images/cross.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/cross.gif -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/icon.png -------------------------------------------------------------------------------- /images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/favicon.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/loading.gif -------------------------------------------------------------------------------- /sound/smb_coin.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_coin.mp3 -------------------------------------------------------------------------------- /sound/smb_coin.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_coin.ogg -------------------------------------------------------------------------------- /sound/smb_coin.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_coin.wav -------------------------------------------------------------------------------- /sound/smb_kick.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_kick.mp3 -------------------------------------------------------------------------------- /sound/smb_kick.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_kick.ogg -------------------------------------------------------------------------------- /sound/smb_kick.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_kick.wav -------------------------------------------------------------------------------- /sound/smb_pause.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_pause.mp3 -------------------------------------------------------------------------------- /sound/smb_pause.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_pause.ogg -------------------------------------------------------------------------------- /sound/smb_pause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb_pause.wav -------------------------------------------------------------------------------- /sound/smw_stomp.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_stomp.mp3 -------------------------------------------------------------------------------- /sound/smw_stomp.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_stomp.ogg -------------------------------------------------------------------------------- /sound/smw_stomp.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_stomp.wav -------------------------------------------------------------------------------- /swf/WebSocketMain.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/swf/WebSocketMain.swf -------------------------------------------------------------------------------- /swf/soundmanager2.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/swf/soundmanager2.swf -------------------------------------------------------------------------------- /templates/ircTab.hbs: -------------------------------------------------------------------------------- 1 | {{{name}}}{{> tabDetach}}{{#if closable}}{{> tabClose}}{{/if}} -------------------------------------------------------------------------------- /images/empty_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/empty_favicon.ico -------------------------------------------------------------------------------- /images/qwebircsmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/qwebircsmall.png -------------------------------------------------------------------------------- /sound/smb3_fireball.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_fireball.mp3 -------------------------------------------------------------------------------- /sound/smb3_fireball.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_fireball.ogg -------------------------------------------------------------------------------- /sound/smb3_fireball.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_fireball.wav -------------------------------------------------------------------------------- /templates/menubtn.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/status.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/b_background_sel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/b_background_sel.gif -------------------------------------------------------------------------------- /sound/smw_spring_jump.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_spring_jump.mp3 -------------------------------------------------------------------------------- /sound/smw_spring_jump.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_spring_jump.ogg -------------------------------------------------------------------------------- /sound/smw_spring_jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smw_spring_jump.wav -------------------------------------------------------------------------------- /swf/soundmanager2_debug.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/swf/soundmanager2_debug.swf -------------------------------------------------------------------------------- /templates/loadingPage.hbs: -------------------------------------------------------------------------------- 1 |
    {{lang "loadingMessage"}}url
    -------------------------------------------------------------------------------- /templates/qwebirc-layout.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    -------------------------------------------------------------------------------- /images/b_background_sel2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/b_background_sel2.gif -------------------------------------------------------------------------------- /images/b_background_unsel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/b_background_unsel.gif -------------------------------------------------------------------------------- /swf/soundmanager2_flash9.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/swf/soundmanager2_flash9.swf -------------------------------------------------------------------------------- /sound/smb3_frog_mario_walk.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_frog_mario_walk.mp3 -------------------------------------------------------------------------------- /sound/smb3_frog_mario_walk.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_frog_mario_walk.ogg -------------------------------------------------------------------------------- /sound/smb3_frog_mario_walk.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/sound/smb3_frog_mario_walk.wav -------------------------------------------------------------------------------- /templates/window-container.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megawac/qwebirc-enhancements/HEAD/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /mcss/Readme.md: -------------------------------------------------------------------------------- 1 | Handlebars CSS templates used to dynamically change the qwebirc view based on user options. Would prefer to use less... -------------------------------------------------------------------------------- /templates/userlink.hbs: -------------------------------------------------------------------------------- 1 | {{nick}} -------------------------------------------------------------------------------- /templates/ircstyle.hbs: -------------------------------------------------------------------------------- 1 | {{! Note needs to be a safe string or urls will be escaped }} 2 | {{{text}}} 3 | -------------------------------------------------------------------------------- /lang/panes/options/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "BACKGROUND" : "Background color", 3 | "FONT_COLOUR" : "Font color" 4 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.11 4 | notifications: 5 | email: false 6 | before_script: 7 | - npm install -g grunt-cli -------------------------------------------------------------------------------- /test/server/run.js: -------------------------------------------------------------------------------- 1 | var app = require("./server"); 2 | var port = 8000; 3 | console.log("Started server on 127.0.0.1:%s", port); 4 | app.listen(port); -------------------------------------------------------------------------------- /templates/nickbtn.hbs: -------------------------------------------------------------------------------- 1 |
    {{prefix}}{{nick}}
    {{! wrapped for delegation}} -------------------------------------------------------------------------------- /less/qwebirc/image-popover.less: -------------------------------------------------------------------------------- 1 | .qui .image-popover { 2 | max-width: none; 3 | 4 | .payload { 5 | max-width: 550px; 6 | max-height: 500px; 7 | } 8 | } -------------------------------------------------------------------------------- /templates/customlink.hbs: -------------------------------------------------------------------------------- 1 | {{{val}}} 2 | -------------------------------------------------------------------------------- /templates/menuitem.hbs: -------------------------------------------------------------------------------- 1 | 2 |
  • 3 | {{text}} 4 | {{#if hint}}{{hint}}{{/if}} 5 |
  • 6 | -------------------------------------------------------------------------------- /panes/feedback.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 |
    6 | -------------------------------------------------------------------------------- /templates/ircMessage.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{#if timestamp}}{{$timestamp timestamp}}{{/if}} 3 | {{{message}}} {{! compiled message (prop from ui.theme)}} 4 |
    -------------------------------------------------------------------------------- /js/src/ui/panes/faq.js: -------------------------------------------------------------------------------- 1 | /** 2 | * faq pane 3 | * 4 | * @depends [panes/PanelView] 5 | * @provides [panes/FAQ] 6 | */ 7 | ui.FAQPane = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "faq" 11 | } 12 | }); -------------------------------------------------------------------------------- /sound/readme.md: -------------------------------------------------------------------------------- 1 | https://www.scirra.com/blog/44/on-html5-audio-formats-aac-and-ogg 2 | 3 | Using html5 audio. I use foobar2000 to convert formats 4 | Only really use mp3 and ogg 5 | 6 | The mario sounds are from http://themushroomkingdom.net/media/smw/wav -------------------------------------------------------------------------------- /templates/ircnick.hbs: -------------------------------------------------------------------------------- 1 | <{{prefix}} 2 | {{nick}} 3 | {{#if linkedchannel}}{{linkedchannel}}{{/if}}> 4 | -------------------------------------------------------------------------------- /js/src/ui/panes/wizard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * wizard view 3 | * 4 | * @depends [panes/PanelView] 5 | * @provides [panes/Wizard] 6 | */ 7 | ui.EmbedWizard = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "wizard" 11 | } 12 | }); -------------------------------------------------------------------------------- /js/src/ui/panes/feedback.js: -------------------------------------------------------------------------------- 1 | /** 2 | * feedback view 3 | * 4 | * @depends [panes/PanelView] 5 | * @provides [panes/Feedback] 6 | */ 7 | ui.FeedbackPane = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "feedback" 11 | } 12 | }); -------------------------------------------------------------------------------- /lang/panes/channels/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "channels": { 3 | "title": "Channel list", 4 | "filterHeader": "Filter by topic and name" 5 | }, 6 | 7 | "channel" : "Channel", 8 | "users" : "Users", 9 | "topic" : "Topic" 10 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | insert_final_newline = true 9 | indent_style = space 10 | indent_size = 4 11 | -------------------------------------------------------------------------------- /js/src/ui/panes/PrivacyPolicy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * pp view 3 | * 4 | * @depends [panes/PanelView] 5 | * @provides [panes/Privacy] 6 | */ 7 | ui.PrivacyPolicyPane = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "privacypolicy" 11 | } 12 | }); -------------------------------------------------------------------------------- /panes/partials/channel-list-content.hbs: -------------------------------------------------------------------------------- 1 | {{#each channels}} 2 | 3 | {{users}} 4 | 5 | {{{topic}}} 6 | 7 | {{/each}} -------------------------------------------------------------------------------- /js/src/ui/panes/about.js: -------------------------------------------------------------------------------- 1 | /** 2 | * About view 3 | * 4 | * @depends [panes/PanelView] 5 | * @provides [panes/About] 6 | */ 7 | ui.AboutPane = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "about", 11 | data: { 12 | version: qwebirc.VERSION 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /templates/image-popover.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 | 6 | 7 |
    8 |
    -------------------------------------------------------------------------------- /templates/navbar.hbs: -------------------------------------------------------------------------------- 1 | 4 |
    5 |
    6 | 7 | 8 |
    -------------------------------------------------------------------------------- /test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "mocha": true, 4 | "expect": true, 5 | "describe": true, 6 | "it": true, 7 | "sinon": true, 8 | 9 | "_": true, 10 | 11 | "qwebirc": true 12 | }, 13 | 14 | "expr": true, 15 | 16 | "strict": false, 17 | 18 | "mootools": true 19 | } -------------------------------------------------------------------------------- /less/qwebirc/variables.less: -------------------------------------------------------------------------------- 1 | //Import fonts 2 | // even though these are pretty slow to load as all the content is dynamic I dont think it will matter too much. Gotta profile... 3 | 4 | @qweb-sans-serif: Verdana, sans-serif; 5 | // @qweb-serif: "Tinos", Georgia, serif; 6 | @qweb-mono: Consolas, "Lucida Console", monospace; 7 | 8 | 9 | @qweb-lines: @qweb-mono; -------------------------------------------------------------------------------- /js/src/config/irc-mode-status.js: -------------------------------------------------------------------------------- 1 | /** 2 | * supported irc modes ie admin vocie etc 3 | * @depends [config] 4 | * @provides [config/modes] 5 | */ 6 | config.modes = [ //sort by importance 7 | { 8 | prefix: "@", //prefix 9 | "class": "op", //css class 10 | description: lang.getter("op") 11 | }, 12 | { 13 | voice: "+", 14 | "class": "voice", 15 | description: lang.getter("voice") 16 | } 17 | ]; -------------------------------------------------------------------------------- /lang/Readme.md: -------------------------------------------------------------------------------- 1 | #Localization 2 | 3 | Localization will request files based on the `Accept-Language` in a http request. For instance `Accept-Language=en-US,en;q=0.8,es;q=0.6` will compile a response of `en-US.json + en.json + base.json` assuming they all exist. 4 | 5 | Requires a server with localization (see [this commit](https://github.com/megawac/iris/commit/fed82b8a6a4c9168fda4ee12a657fde5bddfc337)) 6 | 7 | Files in this directory will be converted to minified json in the build step. -------------------------------------------------------------------------------- /test/qwebirc.js: -------------------------------------------------------------------------------- 1 | describe("Core qwebirc methods", function() { 2 | it("qwebirc.ready()", function(done) { 3 | var spy = sinon.spy(); 4 | qwebirc.ready(spy); 5 | 6 | var spy2 = sinon.spy(); 7 | qwebirc.ready(spy2, 1, 2, 3, 4, 5); 8 | setTimeout(function() { 9 | expect(spy.callCount).to.be.equal(1); 10 | expect(spy2.getCall(0).args).to.eql([1, 2, 3, 4, 5]); 11 | done(); 12 | }, 1000); 13 | }); 14 | }); -------------------------------------------------------------------------------- /js/src/config/registeredCTCP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @depends [config, util/utils] 3 | * @provides [config/ctcp] 4 | */ 5 | irc.RegisteredCTCPs = { 6 | "VERSION": Function.from("qwebirc v" + qwebirc.VERSION), 7 | "USERINFO": Function.from("qwebirc"), 8 | "TIME": util.IRCDate, 9 | "PING": _.identity, 10 | "CLIENTINFO": Function.from("PING VERSION TIME USERINFO CLIENTINFO WEBSITE"), 11 | "WEBSITE": Function.from(((window == window.top) ? "direct" : document.referrer)) 12 | }; 13 | -------------------------------------------------------------------------------- /templates/detachedWindow.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | {{channel}} 5 |
    6 | {{> tabAttach}} 7 | {{#unless base}}{{> tabClose}}{{/unless}} 8 |
    9 |
    10 |
    11 | 12 |
    13 |
    14 |
    15 |
    -------------------------------------------------------------------------------- /font/entypo.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'EntypoRegular'; 3 | src: url('./entypo.eot'); 4 | src: url('./entypo.eot?#iefix') format('embedded-opentype'), 5 | url('./entypo.woff') format('woff'), 6 | url('./entypo.ttf') format('truetype'), 7 | url('./entypo.svg#EntypoRegular') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | .entypo { 12 | font-family: 'EntypoRegular'; 13 | font-size: 2em; 14 | font-weight: normal; 15 | line-height: 0; 16 | } -------------------------------------------------------------------------------- /less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false 19 | } 20 | -------------------------------------------------------------------------------- /js/libs/Epitome/3epitome-isequal.js: -------------------------------------------------------------------------------- 1 | ;(function(){ 2 | 'use strict'; 3 | 4 | // wrapper function for requirejs or normal object 5 | var wrap = function(){ 6 | 7 | return _.isEqual; 8 | }; // end wrap 9 | 10 | if (typeof define === 'function' && define.amd){ 11 | define(['./epitome'], wrap); 12 | } 13 | else if (typeof module !== 'undefined' && module.exports){ 14 | require('mootools'); 15 | module.exports = wrap(); 16 | } 17 | else { 18 | this.Epitome || (this.Epitome = {}); 19 | this.Epitome.isEqual = wrap(this.Epitome); 20 | } 21 | }.call(this)); -------------------------------------------------------------------------------- /test/server/server.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var express = require("express"); 4 | var app = express(); 5 | 6 | var base = require("path").resolve(__dirname, "../../"); 7 | 8 | function middleware(req, res, next) { 9 | if (req.url !== "/lang") { 10 | return next(); 11 | } 12 | res.writeHead(200, { 13 | "Content-Type": "application/json" 14 | }); 15 | res.write(JSON.stringify(require(base + "/lang/base.json"))); 16 | res.end(); 17 | } 18 | 19 | app.use(middleware); 20 | app.use(express.static(base)); 21 | 22 | module.exports = app; -------------------------------------------------------------------------------- /templates/window.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{#if isChannel}} 3 |
    {{> topicText}}
    4 | {{/if}} 5 |
    6 |
    7 | {{#if isChannel}} 8 |
    9 | {{/if}} 10 |
    11 |
    {{> channelName}}
    12 |
    13 | {{#if needsInput}}{{> ircInput}}{{/if}} 14 |
    15 |
    -------------------------------------------------------------------------------- /js/src/ui/panes/ToggleDesktopNotifications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @provides [ util/ToggleNotifications] 3 | */ 4 | /* exported toggleNotifications */ 5 | function toggleNotifications(model, state, save) { 6 | if(notify.permissionLevel() !== notify.PERMISSION_GRANTED) { 7 | notify.requestPermission(function() { 8 | toggleNotifications(model, notify.permissionLevel() === notify.PERMISSION_GRANTED, save); 9 | }); 10 | } 11 | else { 12 | model.set("dn_state", state != null ? !!state : !model.get("dn_state")); 13 | } 14 | if(save) model.save(); 15 | } -------------------------------------------------------------------------------- /less/qwebirc/input.less: -------------------------------------------------------------------------------- 1 | /* type ahead and input decorations */ 2 | .qwebirc { 3 | .tt-query { 4 | padding: 0; 5 | height: 26px; 6 | text-indent: 5px; 7 | position: relative; 8 | vertical-align: top; 9 | background-color: transparent; 10 | } 11 | 12 | //moved decoration to mcss 13 | .tt-hint { 14 | position: absolute; 15 | top: 0px; 16 | left: 0px; 17 | padding: 0; 18 | text-indent: 5px; 19 | box-shadow: none; 20 | color: #BDBDBD; 21 | } 22 | } 23 | 24 | /*end typeahead*/ -------------------------------------------------------------------------------- /less/qwebirc.less: -------------------------------------------------------------------------------- 1 | /* 2 | * qwebirc css by Graeme (megawac) Yeates 3 | * https://github.com/megawac/qwebirc-enhancements 4 | */ 5 | 6 | // Load core variables and mixins 7 | @import "twbs/variables.less"; 8 | @import "twbs/mixins.less"; 9 | @import "qwebirc/variables.less"; 10 | 11 | //customize bootstrap 12 | @import "qwebirc/bootstrap-theme"; 13 | 14 | @import "qwebirc/core"; 15 | @import "qwebirc/tabbar"; 16 | @import "qwebirc/panels"; 17 | @import "qwebirc/loginbox"; 18 | @import "qwebirc/detached-window"; 19 | 20 | @import "qwebirc/irc-colours"; 21 | 22 | 23 | //QUI Theme 24 | @import "qwebirc/qui"; 25 | -------------------------------------------------------------------------------- /js/libs/console-shim.js: -------------------------------------------------------------------------------- 1 | /** 2 | * quick console shim https://gist.github.com/bgrins/5108712 3 | */ 4 | (function(console, noop) { 5 | [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ].forEach(function(method) { 11 | // Only stub undefined methods. 12 | if(!console[method]) console[method] = noop; 13 | }); 14 | })(window.console = window.console || {}, function() {}); -------------------------------------------------------------------------------- /less/twbs/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | .transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /less/twbs/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /templates/ircInput.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{> status}}{{nick}} 4 | {{!autocompleter}} 5 | {{!the actual autocomplete layer - gets rendered underneath the tt-query by css}} 6 | 7 | 8 | 9 | 10 |
    11 |
    -------------------------------------------------------------------------------- /panes/wizard.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 8 |
    qwebirc    
    qwebirc
    Add qwebirc to your site
    9 |
    10 |
    11 |

    I haven't added support for the embedded wizard yet, however you can set up the iFrame manually or clone the source code from the Github repo

    12 | 13 |
    14 | -------------------------------------------------------------------------------- /templates/amd/popup-alert.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /less/twbs/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /js/src/ready.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Promise based ready controller to indicate the app can start loading 3 | * 4 | * @depends [qwebirc, util/lang] 5 | * @provides [ready, qwebirc/ready] 6 | */ 7 | 8 | //qwebirc.js defines readyPromises = [] 9 | /* global readyPromises */ 10 | readyPromises.push(new Promise(function(fulfill) { 11 | document.addEvent("domready", fulfill); 12 | })); 13 | 14 | var qwebircReadyPromise = Promise.all(readyPromises); 15 | 16 | // qwebirc.ready = function(cb/*, args*/) { 17 | // return qwebircReadyPromise.then(_.partial.apply(_, [cb].concat(_.rest(arguments)))); 18 | // }; 19 | qwebirc.ready = function(cb/*, args*/) { 20 | return qwebircReadyPromise.then(cb.pass(_.rest(arguments), this)); 21 | }; 22 | -------------------------------------------------------------------------------- /templates/mainmenu.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lang/panes/welcome/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcome": { 3 | "title": "Welcome to {appTitle}", 4 | 5 | "visitOptions": "Also check out the new options", 6 | 7 | "browseHappy": "a current browser release", 8 | "supportsDesktopNotifications": "which supports desktop notifications", 9 | 10 | "enableNotificationMessage": "Before you login please enable desktop notifications", 11 | "enableNotifications": "Enable notifications", 12 | 13 | "noNotificationSupport": "Your browser does not support desktop notifications.", 14 | "considerThis": "Consider installing", 15 | 16 | "chromeFrame": "Chrome Frame for Internet Explorer", 17 | "chromeFrameTut": "You can follow this tutorial to set up chrome frame.", 18 | 19 | "ffExtension": "the Firefox Tab-notifier extension" 20 | } 21 | } -------------------------------------------------------------------------------- /panes/faq.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 8 |
    qwebirc    
    qwebirc
    Frequently Asked Questions
    9 |
    10 |
    11 |

    Can I make the widget autoconnect?

    12 |

    No, if this was allowed then bad people could IFRAME lots and lots of copies, which would get you glined for having too many clones.
    However you can prefill the channel/nickname information (type /EMBED in the main window).

    13 | 14 |

    To be continued...

    15 | 16 |
    17 | -------------------------------------------------------------------------------- /less/twbs/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Compiled Resources 2 | index.html 3 | dist 4 | templates/modifiablecss.hbs 5 | *.log 6 | 7 | # cool analysis tool https://github.com/es-analysis/plato 8 | report 9 | 10 | #Standard stuff 11 | *.sublime* 12 | *.dropbox 13 | node_modules/ 14 | **/unused/** 15 | 16 | # Compiled source # 17 | ################### 18 | *.com 19 | *.class 20 | *.dll 21 | *.exe 22 | *.o 23 | *.so 24 | 25 | # Packages # 26 | ############ 27 | # it's better to unpack these files and commit the raw source 28 | # git has its own built in compression methods 29 | *.7z 30 | *.dmg 31 | *.gz 32 | *.iso 33 | *.jar 34 | *.rar 35 | *.tar 36 | *.zip 37 | 38 | # Logs and databases # 39 | ###################### 40 | *.log 41 | *.sql 42 | *.sqlite 43 | 44 | # OS generated files # 45 | ###################### 46 | .DS_Store 47 | .DS_Store? 48 | ._* 49 | .Spotlight-V100 50 | .Trashes 51 | ehthumbs.db 52 | Thumbs.db -------------------------------------------------------------------------------- /templates/nickMenu.hbs: -------------------------------------------------------------------------------- 1 |
    2 | {{#if showNick}}{{nick}}{{/if}} 3 | 13 |
    -------------------------------------------------------------------------------- /less/twbs/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /panes/channel-list.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{lang "channels.title"}} 4 |
    5 | 6 | 7 |
    8 |
    9 |
    10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{! content loaded here }} 20 | 21 |
    {{lang "users"}}{{lang "channel"}}{{lang "topic"}}
    22 |
    23 |
    -------------------------------------------------------------------------------- /licence.lic: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2014 the qwebirc project. 2 | http://www.qwebirc.org/ 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | version 2 as published by the Free Software Foundation. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | 17 | Though it is not required, we would appreciate public facing 18 | instances leaving a mention of the original author(s) and the 19 | project name and URL in the about dialog, thanks! -------------------------------------------------------------------------------- /less/qwebirc/loginbox.less: -------------------------------------------------------------------------------- 1 | .qwebirc .window .login { 2 | text-align: center; 3 | // width: 500px; 4 | margin: 0 auto 5px; 5 | 6 | 7 | &.hide-auth .auth { 8 | display: none; 9 | visibility: hidden; 10 | } 11 | 12 | div { 13 | width: 385px; 14 | margin: .25em auto; 15 | } 16 | 17 | > * { 18 | margin: .5em 0; 19 | } 20 | 21 | .login-field { 22 | margin: 0 auto; 23 | input { 24 | width: 200px; 25 | } 26 | } 27 | 28 | input { 29 | margin-left: 5px; 30 | } 31 | 32 | .form-control { 33 | display: inline; 34 | height: auto; 35 | padding: 4px 8px; 36 | font-size: inherit; 37 | line-height: inherit; 38 | } 39 | } 40 | 41 | /************* Welcome *****************/ 42 | .qwebirc .welcome { 43 | position: absolute; 44 | bottom: 0; 45 | right: 10px; 46 | max-width: 700px; 47 | } -------------------------------------------------------------------------------- /js/libs/Epitome/2epitome.js: -------------------------------------------------------------------------------- 1 | ;(function(){ 2 | 'use strict'; 3 | 4 | var obj, 5 | wrap = function(Events){ 6 | var e = new Events(); 7 | e.Events = Events; 8 | return e; 9 | }; 10 | 11 | // by default, requiring Epitome returns an Epitome.Events instance as a mediator 12 | if (typeof define === 'function' && define.amd){ 13 | // returns an empty module 14 | define(['./epitome-events'], wrap); 15 | } 16 | else if (typeof module !== 'undefined' && module.exports){ 17 | // CommonJS module is defined 18 | // load mootools-core npm 19 | require('mootools'); 20 | 21 | obj = wrap(require('./epitome-events')); 22 | 23 | // export all sub modules that work w/o a browser. 24 | obj.Model = require('./epitome-model'); 25 | obj.Collection = require('./epitome-collection'); 26 | obj.isEqual = require('./epitome-isequal'); 27 | obj.Template = require('./epitome-template'); 28 | 29 | module.exports = obj; 30 | } 31 | else { 32 | this.Epitome = wrap(this.Epitome.Events); 33 | } 34 | }.call(this)); -------------------------------------------------------------------------------- /less/twbs/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /less/twbs/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: (@jumbotron-padding / 2); 18 | font-size: @jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | .container & { 23 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 24 | } 25 | 26 | .container { 27 | max-width: 100%; 28 | } 29 | 30 | @media screen and (min-width: @screen-sm-min) { 31 | padding-top: (@jumbotron-padding * 1.6); 32 | padding-bottom: (@jumbotron-padding * 1.6); 33 | 34 | .container & { 35 | padding-left: (@jumbotron-padding * 2); 36 | padding-right: (@jumbotron-padding * 2); 37 | } 38 | 39 | h1, 40 | .h1 { 41 | font-size: (@font-size-base * 4.5); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /less/twbs/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /less/twbs/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /configure/config.js: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | Init config -- compiled settings from ../app-config.yml 3 | 4 | To create a new instance call `qwebirc.createInstance([element or id], [ui class (eg qui)], options) 5 | 6 | The configurable options are shown in: https://github.com/megawac/qwebirc-enhancements/blob/master/js/src/ui/Interface.js#L2 7 | 8 | settings (eg nick) are here: https://github.com/megawac/qwebirc-enhancements/blob/master/js/src/config/settings.js#L6 9 | 10 | uiOptions are here: https://github.com/megawac/qwebirc-enhancements/blob/master/js/src/config/options.js#L3 11 | 12 | IRC client options are here: https://github.com/megawac/qwebirc-enhancements/blob/master/js/src/irc/ircclient.js#L5 13 | 14 | You can also make custom changes here such as adjusting the servers commands (eg auth) 15 | 16 | 17 | This file will be minified and moved to js/dist/app-version.js on build 18 | 19 | ******************************************************************/ 20 | 21 | this.app = qwebirc.createInstance("ircui", <%= serialize(config.init_config) %>); -------------------------------------------------------------------------------- /less/qwebirc/detached-window.less: -------------------------------------------------------------------------------- 1 | .qwebirc .detached { 2 | height: 0 !important; //override window wrapper default height 3 | 4 | .detached-window { 5 | border-radius: 5px; 6 | border: 4px solid #800000; 7 | z-index: 2; 8 | 9 | transform: translateZ(0); 10 | 11 | .body { 12 | position: absolute; 13 | top: 25px; 14 | bottom: 0; 15 | width: 100%; 16 | } 17 | } 18 | .header { 19 | padding: 4px 0; 20 | .title { 21 | padding-left: 10px; 22 | font-weight: bold; 23 | font-size: 16px; 24 | } 25 | 26 | .controls .entypo { 27 | font-size: 1.2em; 28 | padding-right: 4px; 29 | } 30 | } 31 | .resize-handle { 32 | margin: -35px -5px 0 0; 33 | padding: 0 5px 5px 0; 34 | position: absolute; 35 | bottom: 0; 36 | right: 0; 37 | cursor: se-resize; 38 | 39 | // transform: rotate(180deg); 40 | // writing-mode: bt-rl; 41 | } 42 | } 43 | 44 | .detached.active .detached-window { 45 | z-index: 10; 46 | } -------------------------------------------------------------------------------- /js/src/irc/CommandHistory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * CommandHistory inteface... Probably should be moved to ui 3 | * 4 | * @depends [util/utils] for browser.isMobile 5 | * @provides [irc/CommandHistory] 6 | */ 7 | irc.CommandHistory = new Class({ 8 | Extends: Epitome.Model.Storage, 9 | Implements: [Options], 10 | options: { 11 | lines: 20, 12 | minlen: 2, 13 | storage: { 14 | fallback: false//dont save on shit browsers 15 | }, 16 | store: !Browser.isMobile, 17 | key: cookies.history 18 | }, 19 | 20 | addLine: function(name, line) { 21 | var data = this.get(name).erase(line); 22 | if(line.length > this.options.minlen) { 23 | data.unshift(line); 24 | if (data.length > this.options.lines) { 25 | data.pop(); 26 | } 27 | this.set(name, data); 28 | this.save(); 29 | } 30 | }, 31 | 32 | addChannel: function(name) { 33 | if(!this.get(name)) this.set(name, []); 34 | }, 35 | 36 | removeChannel: function(name) { 37 | this.unset(name); 38 | if(this.options.store) this.save(); 39 | } 40 | 41 | // _filter: _.not(_.isEmpty) 42 | }); -------------------------------------------------------------------------------- /js/libs/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | // JSHint linting config 3 | // Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc 4 | // Documentation: http://www.jshint.com/docs/options/ 5 | "globals": { 6 | 7 | //Mootools 8 | "Browser": true, 9 | "Elements": true, 10 | "Class": true, 11 | "Options": true, 12 | "Events": true, 13 | "Request": true, 14 | "Type": true, 15 | "typeOf": true, 16 | "Fx": true, 17 | "$": true, 18 | "$$": true, 19 | 20 | //libs 21 | "_": true, 22 | "Epitome": true, 23 | "Bootstrap": true, 24 | 25 | //Qwebirc 26 | "qwebirc": true, 27 | "ui": true, 28 | "irc": true, 29 | "util": true, 30 | "lang": true, 31 | "templates": true, 32 | "config": true, 33 | "cookies": true 34 | }, 35 | 36 | "browser": true, 37 | "esnext": true, 38 | "globalstrict": false, 39 | "strict": false,//strict declared at top 40 | 41 | "smarttabs": true, 42 | "trailing": true, 43 | "indent": 4, 44 | 45 | "unused": true, 46 | "undef": true, 47 | "eqnull": true, 48 | "immed": true, 49 | "noarg": true, 50 | "freeze": false, 51 | 52 | "lastsemic": true, 53 | "laxcomma": false, 54 | 55 | "newcap": true, 56 | "nonew": false 57 | } -------------------------------------------------------------------------------- /less/qwebirc/irc-op-status.less: -------------------------------------------------------------------------------- 1 | .qwebirc { 2 | 3 | .user .status { 4 | border-radius: 50%; 5 | display: inline-block; 6 | margin-right: 3px; 7 | } 8 | 9 | .status { 10 | &.animate { 11 | animation-name: spin; 12 | animation-duration: 3s; 13 | animation-iteration-count: infinite; 14 | animation-timing-function: linear; 15 | 16 | width: 8px; 17 | height: 8px; 18 | } 19 | 20 | &.voice { 21 | background-color: rgb(223, 187, 47); 22 | background-image: radial-gradient(circle, yellow 0%, orange 100%, red 95%); 23 | } 24 | 25 | &.op { 26 | background-color: #7AE60E; 27 | background-image: radial-gradient(circle, #5fff4a 3%, #7ae60e 76%); 28 | 29 | // background-image: radial-gradient(45px 45px 45deg, circle, #5FFF4A 3%, #7AE60E 76%); 30 | // background-image: -moz-radial-gradient(45px 45px 45deg, circle, #5FFF4A 3%, #7AE60E 76%); 31 | // background-image: -o-radial-gradient(45px 45px, circle, #5FFF4A 3%, #7AE60E 76%); 32 | // background-image: -webkit-radial-gradient(45px 45px, circle, #5FFF4A 3%, #7AE60E 76%); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /less/twbs/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | } 36 | 37 | // Hover state, but only for links 38 | a.badge { 39 | &:hover, 40 | &:focus { 41 | color: @badge-link-hover-color; 42 | text-decoration: none; 43 | cursor: pointer; 44 | } 45 | } 46 | 47 | // Account for counters in navs 48 | a.list-group-item.active > .badge, 49 | .nav-pills > .active > a > .badge { 50 | color: @badge-active-color; 51 | background-color: @badge-active-bg; 52 | } 53 | .nav-pills > li > a > .badge { 54 | margin-left: 3px; 55 | } 56 | -------------------------------------------------------------------------------- /js/src/constants/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @depends [ui, irc, constants] 3 | * @provides [util/constants] 4 | */ 5 | ui.WINDOW = { 6 | status: 1, 7 | query: 2, 8 | channel: 4, 9 | custom: 8, 10 | connect: 16, 11 | messages: 32, 12 | all: 10, 13 | active: 9 //currently selected window 14 | }; 15 | 16 | 17 | irc.pmodes = { 18 | LIST: 0, 19 | SET_UNSET: 1, 20 | SET_ONLY: 2, 21 | regular: 3 22 | }; 23 | 24 | 25 | constants.hl = { 26 | none: 0, 27 | activity: 1, 28 | speech: 2, 29 | us: 3 30 | }; 31 | 32 | //window names 33 | constants.brouhaha = "brouhaha"; 34 | constants.status = "status"; 35 | constants.login = "login"; 36 | constants.active = ui.WINDOW.active; 37 | constants.all = ui.WINDOW.all; 38 | 39 | 40 | // constants.window = { 41 | // brouhaha: "#brouhaha", 42 | // connect: "Connection details", 43 | // status: "Status" 44 | // }; 45 | 46 | constants.BASE_WINDOWS = [constants.brouhaha, constants.status, constants.login]; 47 | constants.CHANNEL_TYPES = [ui.WINDOW.channel, ui.WINDOW.query, ui.WINDOW.messages]; 48 | constants.INPUT_TYPES = [ui.WINDOW.status, ui.WINDOW.query, ui.WINDOW.channel, ui.WINDOW.messages]; 49 | 50 | constants.op = "+"; 51 | constants.deop = "-"; 52 | constants.prefixes = { 53 | op: "@", 54 | voice: "+" 55 | }; 56 | -------------------------------------------------------------------------------- /templates/amd/popup-dialog.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /less/twbs/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /test/Elements.from.js: -------------------------------------------------------------------------------- 1 | /* 2 | --- 3 | name: Elements.From Tests 4 | requires: [More/Elements.From] 5 | provides: [Elements.From.Tests] 6 | ... 7 | */ 8 | describe("Elements.From", function() { 9 | 10 | it("should return a group of elements", function() { 11 | var str = "

    foo

    bar"; 12 | var div = new Element("div"); 13 | expect(div.adopt(Elements.from(str)).get("html").toLowerCase().trim()).to.equal(str); 14 | }); 15 | 16 | it("should return a text nodes as well as elements", function() { 17 | var str = "

    foo

    some text bar more text"; 18 | var div = new Element("div"); 19 | expect(div.adopt(Elements.from(str)).get("html").toLowerCase().trim()).to.equal(str); 20 | }); 21 | 22 | // it("should return a group of table elements", function() { 23 | // var str = "foo"; 24 | // var tbody = new Element("tbody").inject(new Element("table")).adopt(Elements.from(str)); 25 | // expect(tbody.get("html").toLowerCase().replace(/\s+/g, "").trim()).to.equal(str); 26 | // }); 27 | 28 | it("should also process commented out html", function() { 29 | var str = "

    foo

    stuff"; 30 | var commented = " " + str; 31 | var div = new Element("div").adopt(Elements.from(commented)); 32 | expect(div.get("html").toLowerCase().trim()).to.equal(str); 33 | }); 34 | 35 | }); -------------------------------------------------------------------------------- /js/src/ui/panes/welcome.js: -------------------------------------------------------------------------------- 1 | /** 2 | * welcome view 3 | * 4 | * @depends [panes/PanelView, util/ToggleNotifications] 5 | * @provides [panes/Welcome] 6 | */ 7 | ui.WelcomePane = new Class({ 8 | Extends: PanelView, 9 | options: { 10 | pane: "welcome-pane", 11 | i18n: "welcome", 12 | events: { 13 | "click:relay(.enable-notifications)": "enableNotifications", 14 | "click:relay(.controls)": "controlClick" 15 | }, 16 | onEnableNotifications: function() { 17 | /* global toggleNotifications */ 18 | toggleNotifications(this.ui.uiOptions, true, true); 19 | }, 20 | onControlClick: function(e, controls) { 21 | controls.dispose(); 22 | if(!this.element.getElement(".controls")) this._close(); 23 | } 24 | }, 25 | initialize: function(ui, options) { 26 | this.ui = ui; 27 | this.parent(options); 28 | }, 29 | getData: function() { 30 | return _.extend({}, this.options, { 31 | Browser: window.Browser 32 | }); 33 | } 34 | }) 35 | .extend({ 36 | show: function(_ui, options) {//determines if needs to be shown and shows 37 | if(options.firstvisit || notify.permissionLevel() !== notify.PERMISSION_GRANTED) { 38 | options.element = new Element("div.welcome").inject(options.element); 39 | return new ui.WelcomePane(_ui, options); 40 | } 41 | } 42 | }); -------------------------------------------------------------------------------- /less/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "twbs/variables.less"; 3 | @import "twbs/mixins.less"; 4 | 5 | // Reset 6 | @import "twbs/normalize.less"; 7 | @import "twbs/print.less"; 8 | 9 | // Core CSS 10 | @import "twbs/scaffolding.less"; 11 | @import "twbs/type.less"; 12 | // @import "twbs/code.less"; 13 | @import "twbs/grid.less"; 14 | @import "twbs/tables.less"; 15 | @import "twbs/forms.less"; 16 | @import "twbs/buttons.less"; 17 | 18 | // Components 19 | @import "twbs/component-animations.less"; 20 | // @import "twbs/glyphicons.less"; 21 | @import "twbs/dropdowns.less"; 22 | @import "twbs/button-groups.less"; 23 | @import "twbs/input-groups.less"; 24 | @import "twbs/navs.less"; 25 | // @import "twbs/navbar.less"; 26 | // @import "twbs/breadcrumbs.less"; 27 | // @import "twbs/pagination.less"; 28 | @import "twbs/pager.less"; 29 | @import "twbs/labels.less"; 30 | // @import "twbs/badges.less"; 31 | @import "twbs/jumbotron.less"; 32 | // @import "twbs/thumbnails.less"; 33 | @import "twbs/alerts.less"; 34 | // @import "twbs/progress-bars.less"; 35 | // @import "twbs/media.less"; 36 | @import "twbs/list-group.less"; 37 | @import "twbs/panels.less"; 38 | @import "twbs/wells.less"; 39 | @import "twbs/close.less"; 40 | 41 | // Components w/ JavaScript 42 | @import "twbs/modals.less"; 43 | // @import "twbs/tooltip.less"; 44 | @import "twbs/popovers.less"; 45 | // @import "twbs/carousel.less"; 46 | 47 | // Utility classes 48 | @import "twbs/utilities.less"; 49 | @import "twbs/responsive-utilities.less"; 50 | -------------------------------------------------------------------------------- /test/test-runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Mocha Tests 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | 20 |
    21 |
    22 |
    23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /less/twbs/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | white-space: nowrap; 21 | border-radius: @border-radius-base; 22 | } 23 | 24 | // User input typically entered via keyboard 25 | kbd { 26 | padding: 2px 4px; 27 | font-size: 90%; 28 | color: @kbd-color; 29 | background-color: @kbd-bg; 30 | border-radius: @border-radius-small; 31 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 32 | } 33 | 34 | // Blocks of code 35 | pre { 36 | display: block; 37 | padding: ((@line-height-computed - 1) / 2); 38 | margin: 0 0 (@line-height-computed / 2); 39 | font-size: (@font-size-base - 1); // 14px to 13px 40 | line-height: @line-height-base; 41 | word-break: break-all; 42 | word-wrap: break-word; 43 | color: @pre-color; 44 | background-color: @pre-bg; 45 | border: 1px solid @pre-border-color; 46 | border-radius: @border-radius-base; 47 | 48 | // Account for some code outputs that place code tags in pre tags 49 | code { 50 | padding: 0; 51 | font-size: inherit; 52 | color: inherit; 53 | white-space: pre-wrap; 54 | background-color: transparent; 55 | border-radius: 0; 56 | } 57 | } 58 | 59 | // Enable scrollable blocks of code 60 | .pre-scrollable { 61 | max-height: @pre-scrollable-max-height; 62 | overflow-y: scroll; 63 | } 64 | -------------------------------------------------------------------------------- /templates/authpage.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 28 |
    {{channels}}
    29 |
    -------------------------------------------------------------------------------- /js/src/irc/IRC_Error.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ircclient non whois replies 3 | * 4 | * @depends [irc/Client] 5 | * @depends [util/utils] 6 | * @provides [irc/Error] 7 | */ 8 | 9 | function genericIRCError(data, target) { 10 | var message = _.last(data.args); 11 | 12 | if (!target) { 13 | target = util.isChannel(data.args[1]) ? data.args[1] : constants.status; 14 | } 15 | 16 | this.trigger("error", { 17 | target: target, 18 | channel: target, 19 | message: message, 20 | type: "genericError", 21 | colourClass: "warn" 22 | }); 23 | return true; 24 | } 25 | 26 | irc.Client.implement({ 27 | 28 | IRC_COMMAND_MAP: { 29 | "ERR_CANNOTSENDTOCHAN": "channelError", 30 | "ERR_CHANOPRIVSNEEDED": "channelError", 31 | "ERR_NOSUCHNICK": "channelError" 32 | }, 33 | 34 | irc_ERR_NICKNAMEINUSE: function(data) {//add some number to the nick and resend 35 | if(!this.__signedOn) { 36 | var nick = data.args[1]; 37 | var newnick = nick + Array.getRandom("_`-"); 38 | 39 | this.ALL_ERROR(lang.nickTaken, { 40 | oldnick: nick, 41 | nick: newnick 42 | }); 43 | 44 | this.send(util.formatCommand("NICK", {nick: newnick})); 45 | } 46 | return true; 47 | }, 48 | 49 | ALL_ERROR: function(message, data, settings) { 50 | this.writeMessages(message, data, _.extend({ 51 | channels: constants.all, 52 | type: lang.TYPES.ERROR 53 | }, settings)); 54 | }, 55 | 56 | channelError: _.partial(genericIRCError, _, constants.active), 57 | 58 | IRC_ERROR: genericIRCError 59 | }); -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | // JSHint linting config 3 | // Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc 4 | // Documentation: http://www.jshint.com/docs/options/ 5 | "globals": { 6 | //Polyfilled 7 | "Promise": true, 8 | 9 | //Mootools 10 | "Browser": true, 11 | "Elements": true, 12 | "Class": true, 13 | "Options": true, 14 | "Events": true, 15 | "Request": true, 16 | "Type": true, 17 | "typeOf": true, 18 | "Fx": true, 19 | "$": true, 20 | "$$": true, 21 | "Asset": true, 22 | "Storage": true, 23 | "Color": true, 24 | 25 | //libs 26 | "_": true, 27 | "Epitome": true, 28 | "Bootstrap": true, 29 | "Base64": true, 30 | "notify": true, 31 | "one": true, 32 | 33 | //Qwebirc 34 | "qwebirc": true, 35 | "ui": true, 36 | "irc": true, 37 | "util": true, 38 | "lang": true, 39 | "sound": true, 40 | "templates": true, 41 | "config": true, 42 | "cookies": true, 43 | "constants": true, 44 | "windowNames": true, 45 | "components": true, 46 | "PanelView": true, 47 | 48 | //Locals 49 | "DEBUG": true 50 | }, 51 | 52 | "browser": true, 53 | "mootools": true, 54 | "esnext": true, 55 | "globalstrict": false, 56 | "strict": false,//strict declared at top 57 | "devel": true, 58 | 59 | "smarttabs": true, 60 | "trailing": true, 61 | "indent": 4, 62 | "quotmark": "double", 63 | 64 | "unused": true, 65 | "undef": true, 66 | "eqnull": true, 67 | "immed": true, 68 | "noarg": true, 69 | "freeze": false, 70 | "maxcomplexity": 10, 71 | 72 | "lastsemic": true, 73 | "laxcomma": false, 74 | 75 | "newcap": true, 76 | "nonew": false 77 | } -------------------------------------------------------------------------------- /configure/index.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% if(config.network) { %><%= config.network %> <% } %>WebIRC Using QWebirc v<%= pkg.version %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
    35 | 40 |
    41 | 42 | <%= config.qwebirc_config.extra_html %> 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /less/twbs/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: (@alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 58 | } 59 | .alert-info { 60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 61 | } 62 | .alert-warning { 63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 64 | } 65 | .alert-danger { 66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /templates/amd/welcome-pane.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    {{lang "welcome.title"}}

    4 |
    5 |

    6 | {{#if Browser.Features.notifications}} 7 | {{lang "welcome.enableNotificationMessage"}} {{lang "welcome.enableNotifications"}} 8 | {{else}} 9 | {{lang "welcome.noNotificationSupport"}} {{lang "welcome.considerThis"}} 10 | {{#if Browser.ie}} {{lang "welcome.chromeFrame"}} 11 |
    12 | {{lang "welcome.chromeFrameTut"}} 13 | {{else}} 14 | {{#if Browser.firefox}} {{lang "welcome.ffExtension"}} 15 | {{else}}{{! http://caniuse.com/notifications }} 16 | {{lang "welcome.browseHappy"}}{{lang "welcome.desktopNotifications"}} 17 | {{/if}} 18 | {{/if}} 19 | {{/if}} 20 |

    21 |
    22 | {{#if firstvisit}} 23 |
    24 |

    {{lang "welcome.visitOptions"}} {{lang "windowNames.options"}}

    25 |
    26 | {{/if}} 27 |
    -------------------------------------------------------------------------------- /js/src/config/settings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * user settings 3 | * @depends [config, cookies] 4 | * @provides [config/Settings] 5 | */ 6 | var encode = window.btoa || _.identity, 7 | decode = window.atob || _.identity; 8 | config.Settings = new Class({ 9 | Extends: Epitome.Model.Storage, 10 | options: { 11 | defaults: { 12 | "channels": [], 13 | "nickname": "", 14 | "username": "", 15 | "password": "", 16 | "auth": false, 17 | "newb": "<%= config.user_settings.welcome_message %>" !== "false" //first visit 18 | }, 19 | key: cookies.settings, 20 | minimize: false, 21 | 22 | onInit: function() { 23 | this.loaded = true; 24 | } 25 | }, 26 | properties: { 27 | username: { 28 | get: function() { 29 | return decode(this._attributes.username); 30 | }, 31 | set: function(user) { //prevent double encoding 32 | return this.loaded ? encode(user) : user; 33 | } 34 | }, 35 | password: { 36 | get: function() { 37 | return decode(this._attributes.password); 38 | }, 39 | set: function(password) { 40 | return this.loaded ? encode(password) : password; 41 | } 42 | } 43 | }, 44 | 45 | set: function(key, data) { 46 | this.parent(key, data); 47 | if(this.loaded) {//set is called when initing if we save we will lose state 48 | this.save(); 49 | } 50 | return this; 51 | }, 52 | 53 | unset: function(key) { 54 | this.parent(key); 55 | return this.save(); 56 | } 57 | }); 58 | -------------------------------------------------------------------------------- /js/src/config/commands.js: -------------------------------------------------------------------------------- 1 | /** 2 | * commands are substituted by util.formatter. Please make sure they are the correct command for your server 3 | * eg : https://www.quakenet.org/help/q-commands 4 | * @depends [config] 5 | * @provides [config/commands] 6 | */ 7 | config.IRC_COMMANDS = { //maybe make these templates? 8 | "ACTION": { 9 | command: "PRIVMSG {target} :\x01ACTION {text}\x01" 10 | }, 11 | "CTCP": { 12 | command: "PRIVMSG {target} :\x01{type} {text} \x01" 13 | }, 14 | "PRIVMSG": { 15 | command: "PRIVMSG {target} :{message}" 16 | }, 17 | "JOIN": { 18 | command: "JOIN {channel} {args}" 19 | }, 20 | "NICK": { 21 | command: "NICK {nick}" 22 | }, 23 | "PART": { 24 | command: "PART {channel} :{message}" 25 | }, 26 | "QUIT": { 27 | command: "QUIT :{message}" 28 | }, 29 | "TOPIC": { 30 | command: "TOPIC {channel} :{topic}" 31 | }, 32 | "AWAY": { 33 | command: "AWAY :{message}" 34 | }, 35 | "NOTICE": { 36 | command: "NOTICE {target} :{message}" 37 | }, 38 | "MODE": { 39 | command: "MODE {target} {mode} {args}" 40 | }, 41 | "AUTH": {//templated as quite likely to change 42 | command: "<%= config.qwebirc_config.auth_command %>" || "AUTHSERV AUTH {username} {password}" 43 | }, 44 | "KICK": { 45 | command: "KICK {channel} {kickee} :{message}" 46 | } 47 | }; 48 | 49 | config.COMMAND_ALIAS = { 50 | "J": "JOIN", 51 | "P": "PART", 52 | "MESSAGE": "PRIVMSG", 53 | "M": "PRIVMSG", 54 | "MSG": "PRIVMSG", 55 | "PM": "PRIVMSG", 56 | "Q": "QUERY", 57 | "BACK": "AWAY", 58 | "HOP": "CYCLE", 59 | "SLAP": "ME", 60 | "CLS": "CLEAR" 61 | }; -------------------------------------------------------------------------------- /less/twbs/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /js/src/ui/panes/PanelView.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Base view to be inheritted 3 | * 4 | * @depends [components/loader, util/uihelpers] 5 | * @provides [panes/PanelView] 6 | */ 7 | /* exported PanelView */ 8 | var PanelView = ui.PanelView = new Class({ 9 | Extends: Epitome.View, 10 | options: { 11 | pane: "", 12 | // i18n: "mypanel", 13 | deps: [], 14 | 15 | events: { 16 | "click:relay([data-event='close'])": "_close" 17 | }, 18 | 19 | onReady: function() { 20 | return this.render(); 21 | } 22 | }, 23 | 24 | getData: function() { 25 | return this.model && this.model.toJSON() || this.options && this.options.data || {}; 26 | }, 27 | 28 | render: function() { 29 | var self = this.empty(); 30 | var $loader = Element.from(templates.loadingPage()).inject(self.element); 31 | var loadPromises = [util.getTemplate(self.options.pane), components.loader.load(self.options.deps)]; 32 | if (self.options.i18n) { 33 | loadPromises.push(lang.load("panes/" + self.options.i18n)); 34 | } 35 | 36 | Promise.all(loadPromises) 37 | .then(function(results) { 38 | //results[0] is the template 39 | self.element.adopt(Elements.from(results[0](self.getData())));//not inject because it can have text nodes 40 | $loader.dispose(); 41 | self.postRender(); 42 | }); 43 | return self.parent(); 44 | }, 45 | 46 | postRender: function() { 47 | ui.Behaviour.apply(this.element); //note not native apply (gotcha) 48 | return this; 49 | }, 50 | 51 | empty: function() { 52 | return this.parent(true); 53 | }, 54 | 55 | _close: function() { 56 | return this.trigger("close").destroy(); 57 | } 58 | }); -------------------------------------------------------------------------------- /less/qwebirc/panels.less: -------------------------------------------------------------------------------- 1 | @select-width: 200px; 2 | 3 | .qwebirc .custom { 4 | //generics 5 | .container { 6 | text-align: center; 7 | } 8 | 9 | .header { 10 | background: white; 11 | text-align: center; 12 | border-bottom: 1px solid gray; 13 | padding-top: 5px; 14 | padding-bottom: 5px; 15 | 16 | .subtitle { 17 | text-align: center; 18 | margin-top: 10px; 19 | } 20 | } 21 | 22 | .title { 23 | font-size: 3em; 24 | } 25 | 26 | table { 27 | display: inline-block; 28 | } 29 | } 30 | 31 | 32 | //************* OPTIONS ***************** 33 | .qwebirc .window .options { 34 | padding-left: 25px; 35 | padding-top: 25px; 36 | overflow-y: scroll; 37 | 38 | .actions button { 39 | margin-right: 5px; 40 | } 41 | 42 | .ui-options { 43 | .controls { 44 | padding-bottom: 4px; 45 | } 46 | input { 47 | &.color, &[type="number"] { 48 | width: 60px; 49 | float: left; 50 | margin-left: 10px; 51 | margin-right: 10px; 52 | } 53 | } 54 | } 55 | 56 | .control-label-inline select { 57 | display: inline; 58 | width: @select-width; //requires a width to be set :/ 59 | margin: 0 5px; 60 | } 61 | } 62 | 63 | /**************** Channel list *****************/ 64 | .qwebirc .channel-list { 65 | 66 | .heading { 67 | display: inline-block; 68 | font-size: 18px; 69 | } 70 | .filters { 71 | display: inline-block; 72 | font-size: 14px; 73 | float: right; 74 | } 75 | 76 | .filters label { 77 | margin-right: 5px; 78 | } 79 | table td { 80 | vertical-align: middle; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /js/libs/Elements.from.js: -------------------------------------------------------------------------------- 1 | /* 2 | --- 3 | 4 | script: Elements.From.js 5 | 6 | name: Elements.From 7 | 8 | description: Returns a collection of elements from a string of html. 9 | 10 | license: MIT-style license 11 | 12 | authors: 13 | - Aaron Newton 14 | - adapted by Graeme Yeates 15 | 16 | requires: 17 | - Core/String 18 | - Core/Element 19 | - /MooTools.More 20 | 21 | provides: [Elements.from, Elements.From] 22 | 23 | ... 24 | */ 25 | (function() { 26 | var range; 27 | 28 | window.addEvent('domready', function(){ 29 | range = document.createRange && document.createRange(); 30 | if(range && range.createContextualFragment) { //ie >= 9 31 | range.selectNode(document.getElement('div')); 32 | } else { 33 | range = null; 34 | } 35 | }); 36 | 37 | Elements.from = function(text, excludeScripts){ 38 | if (excludeScripts || excludeScripts == null) text = text.stripScripts(); 39 | 40 | // var match = text.match(/^\s*<(t[dhr]|tbody|tfoot|thead)/i); 41 | // if(match) {//table fix 42 | // var container = new Element('table'); 43 | // var tag = match[1].toLowerCase(); 44 | // if (['td', 'th', 'tr'].contains(tag)){ 45 | // container = new Element('tbody').inject(container); 46 | // if (tag != 'tr') container = new Element('tr').inject(container); 47 | // } 48 | // return new Elements(container.set('html', text).childNodes); 49 | // } 50 | 51 | return new Elements((range ? range.createContextualFragment(text) : //use faster range if available 52 | new Element('div').set('html', text)).childNodes); 53 | }; 54 | })(); 55 | 56 | Element.extend({ 57 | from: function(text, es) { 58 | return Elements.from(text, es)[0]; 59 | } 60 | }); -------------------------------------------------------------------------------- /less/twbs/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | 23 | // Bar itself 24 | // ------------------------- 25 | 26 | // Outer container 27 | .progress { 28 | overflow: hidden; 29 | height: @line-height-computed; 30 | margin-bottom: @line-height-computed; 31 | background-color: @progress-bg; 32 | border-radius: @border-radius-base; 33 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 34 | } 35 | 36 | // Bar of progress 37 | .progress-bar { 38 | float: left; 39 | width: 0%; 40 | height: 100%; 41 | font-size: @font-size-small; 42 | line-height: @line-height-computed; 43 | color: @progress-bar-color; 44 | text-align: center; 45 | background-color: @progress-bar-bg; 46 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 47 | .transition(width .6s ease); 48 | } 49 | 50 | // Striped bars 51 | .progress-striped .progress-bar { 52 | #gradient > .striped(); 53 | background-size: 40px 40px; 54 | } 55 | 56 | // Call animation for the active one 57 | .progress.active .progress-bar { 58 | .animation(progress-bar-stripes 2s linear infinite); 59 | } 60 | 61 | 62 | 63 | // Variations 64 | // ------------------------- 65 | 66 | .progress-bar-success { 67 | .progress-bar-variant(@progress-bar-success-bg); 68 | } 69 | 70 | .progress-bar-info { 71 | .progress-bar-variant(@progress-bar-info-bg); 72 | } 73 | 74 | .progress-bar-warning { 75 | .progress-bar-variant(@progress-bar-warning-bg); 76 | } 77 | 78 | .progress-bar-danger { 79 | .progress-bar-variant(@progress-bar-danger-bg); 80 | } 81 | -------------------------------------------------------------------------------- /js/src/util/lang.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Home of future localization.... Its gonna be a rough road... 3 | * todo request local.json and ready qwebirc only after its loaded 4 | * 5 | * @depend [qwebirc] 6 | * @provides [lang, util/lang] 7 | */ 8 | 9 | /* global readyPromises */ 10 | 11 | _.extend(lang, { 12 | TYPES: { 13 | ERROR: 0, 14 | INFO: 1, 15 | SERVER: 2, 16 | CHAN: 3, 17 | MESSAGE: 4 18 | } 19 | }); 20 | 21 | 22 | lang.getter = function(prop) { 23 | return function() { 24 | return lang[prop]; 25 | }; 26 | }; 27 | 28 | lang.getFormatter = function(prop, data) { 29 | return function() { 30 | return util.format(lang[prop], data); 31 | }; 32 | }; 33 | 34 | lang.load = function(item) { 35 | return new Request.JSON({ 36 | url: qwebirc.global.dynamicBaseURL + "lang", 37 | method: "GET" 38 | }).send(item ? "path=" + encodeURIComponent(item) : "") 39 | .then(function(json) { 40 | _.merge(lang, json); 41 | return json; 42 | }); 43 | }; 44 | 45 | var langRequest = lang.load(); 46 | 47 | langRequest.then(function() { 48 | //language specific stuff. right now just an object 49 | // can either be a message or array of messages 50 | function setLangType(type) { 51 | return function(prop) { 52 | if (_.isArray(lang[prop])) { 53 | lang[prop].type = type; 54 | } else { 55 | lang[prop] = { 56 | message: lang[prop], 57 | type: type 58 | }; 59 | } 60 | }; 61 | } 62 | 63 | [ 64 | "poorJoinFormat" 65 | ].each(setLangType(lang.TYPES.INFO)); 66 | 67 | [ 68 | "invalidCommand", "invalidChanTarget", "insufficentArgs", 69 | "uncontrolledFlood", "connError", "connTimeOut", "connFail" 70 | ].each(setLangType(lang.TYPES.ERROR)); 71 | }); 72 | 73 | readyPromises.push(langRequest); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qwebirc", 3 | "description": "webirc client", 4 | "repository": "www.github.com/megawac/qwebirc-enhancements", 5 | "version": "0.97.0", 6 | "tags": [ 7 | "webirc", 8 | "irc", 9 | "irc client" 10 | ], 11 | "author": { 12 | "name": "Graeme Yeates", 13 | "url": "www.github.com/megawac", 14 | "email": "megawac@gmail.com" 15 | }, 16 | "fork": { 17 | "author": "Chris Porter", 18 | "name": "qwebirc", 19 | "url": "www.qwebirc.org" 20 | }, 21 | "licence": { 22 | "type": "GNU", 23 | "url": "http://www.gnu.org/licenses/gpl.html", 24 | "file": "licence.lic" 25 | }, 26 | "scripts": { 27 | "prepublish": "grunt", 28 | "test": "grunt test" 29 | }, 30 | "optionalDependencies": { 31 | "grunt-contrib-jshint": "0.10", 32 | "grunt-express": "~1.2.1", 33 | "grunt-mocha": "0.4", 34 | "expect.js": "0.3", 35 | "express": "4.0", 36 | "mocha": "1.18", 37 | "sinon": "~1.9.1" 38 | }, 39 | "devDependencies": { 40 | "grunt": "^0.4.5", 41 | "grunt-autoprefixer": "~0.7.2", 42 | "grunt-concat-in-order": "~0.1", 43 | "grunt-contrib-concat": "0.3", 44 | "grunt-contrib-csslint": "0.2", 45 | "grunt-contrib-cssmin": "0.7", 46 | "grunt-contrib-handlebars": "0.7", 47 | "grunt-contrib-less": "~0.11.3", 48 | "grunt-contrib-uglify": "0.3", 49 | "grunt-csscomb": "2.0", 50 | "grunt-file-info": "~1.0.4", 51 | "grunt-html-build": "0.3", 52 | "grunt-release": "0.7", 53 | "lodash": "https://github.com/lodash/lodash/tarball/10adb686248793fd0f3e237c3928719c6d88e5b5", 54 | "toSrc": "~0.1.3" 55 | }, 56 | "frontend-dependencies": { 57 | "twbs": { 58 | "version": "3.1.1" 59 | }, 60 | "mootools": { 61 | "version": "1.4.5" 62 | }, 63 | "respond": { 64 | "version": "1.4" 65 | }, 66 | "soundManager": { 67 | "version": "2.97a.20130512" 68 | }, 69 | "Handlebars": { 70 | "version": "1.0.0" 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /js/src/qwebirc.js: -------------------------------------------------------------------------------- 1 | /** 2 | * qwebirc -- Copyright (C) 2008-2011 Chris Porter and the qwebirc project --- All rights reserved. 3 | * 4 | * @provides [qwebirc, irc, util, config, auth, ui, components, cookies, sound, lang, windowNames, templates, constants] 5 | */ 6 | 7 | /* exported irc, util, ui, cookies, config, auth, components, sound, templates, constants, windowNames, readyPromises */ 8 | 9 | //wrapped in iife during grunt build 10 | /* jshint ignore:start */ 11 | 12 | //cache common globals in scope 13 | var $ = document.id, 14 | $$ = document.getElements, 15 | Class = window.Class, 16 | Options = window.Options, 17 | Events = window.Events, 18 | _ = window._, 19 | Epitome = window.Epitome; 20 | 21 | /* jshint ignore:end */ 22 | 23 | 24 | //global object 25 | var qwebirc = window.qwebirc = _.merge(window.qwebirc || {}, { 26 | DEBUG: "<%= build.debug %>" === "true", 27 | irc: {}, 28 | ui: {}, 29 | util: {}, 30 | components: {}, 31 | global: { 32 | dynamicBaseURL: "<%= config.qwebirc_config.base_url %>" || "/", 33 | staticBaseURL: "<%= config.qwebirc_config.static_url %>" || "/" 34 | }, 35 | config: {}, 36 | sound: {}, 37 | lang: { 38 | windowNames: {} 39 | }, 40 | constants: {}, 41 | templates: {}, 42 | cookies: { 43 | "options": "qweb-options", 44 | "history": "qweb-hist", 45 | "settings": "qweb-settings" 46 | }, 47 | VERSION: "<%= pkg.version %>" 48 | }); 49 | 50 | var irc = qwebirc.irc, 51 | 52 | util = qwebirc.util, 53 | 54 | config = qwebirc.config, 55 | auth = qwebirc.auth, 56 | 57 | ui = qwebirc.ui, 58 | components = qwebirc.comp = qwebirc.components, 59 | 60 | cookies = qwebirc.cookies, 61 | 62 | sound = qwebirc.sound, 63 | 64 | lang = qwebirc.lang, 65 | windowNames = lang.windowNames, 66 | 67 | templates = qwebirc.templates, 68 | 69 | constants = qwebirc.constants; 70 | 71 | //promises indicating qwebirc is ready to load 72 | var readyPromises = []; 73 | -------------------------------------------------------------------------------- /less/qwebirc/tabbar.less: -------------------------------------------------------------------------------- 1 | .qwebirc { 2 | 3 | .outertabbar { 4 | height: 26px; 5 | line-height: 20px; 6 | padding: 2px 0; 7 | 8 | > * { 9 | vertical-align: top; 10 | } 11 | 12 | .dropdown-tab { 13 | cursor: pointer; cursor: hand; 14 | display: inline-block; 15 | padding-left: 4px; 16 | width: 30px; 17 | } 18 | } 19 | 20 | .tabbar { 21 | display: inline-block; 22 | overflow-x: hidden; 23 | margin-left: 10px; 24 | font-size: 13px; 25 | height: 22px; 26 | 27 | .tab { 28 | padding: 2px; 29 | padding-right: 4px; 30 | cursor: default; 31 | margin-right: 3px; 32 | white-space: nowrap; 33 | font-weight: bold; 34 | border-radius: 4px; 35 | 36 | user-select: none; 37 | 38 | &:hover,&.selected { 39 | background: #fff; 40 | background: rgba(255, 255, 255, 0.9); 41 | } 42 | &.brouhaha { 43 | background-image: url("/images/b_background_unsel.gif"); 44 | padding-left: 65px; //width wont work here 45 | opacity: 0.8; 46 | 47 | &.selected { 48 | background-image: url("/images/b_background_sel2.gif"); 49 | } 50 | } 51 | 52 | &.hilight-activity { 53 | color: #009900; 54 | } 55 | &.hilight-speech { 56 | color: #0000ff; 57 | } 58 | &.hilight-us { 59 | color: #ff0000; 60 | background: #d8d88a; 61 | } 62 | } 63 | 64 | // too small imo at 10px 65 | .tab-close { 66 | font-size: 12px; 67 | padding-left: 3px; 68 | } 69 | .detach { 70 | font-size: 10px; 71 | padding-left: 3px; 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /js/src/ui/panes/ChannelList.js: -------------------------------------------------------------------------------- 1 | // <% if(pkg.build["atheme"]) { %> only include this code if "atheme" set in package.json 2 | /** 3 | * chan list view 4 | * 5 | * @depends [panes/PanelView, atheme] 6 | * @provides [panes/Channels] 7 | */ 8 | ui.ChannelList = new Class({ 9 | Extends: PanelView, 10 | options: { 11 | pane: "channel-list", 12 | i18n: "channels", 13 | events: { 14 | "click:relay(.refresh)": "postRender", 15 | "keypress:relay(input.filter)": "update", 16 | "change:relay(input.filter)": "update", 17 | 18 | "click:relay(.internal,.chan)": "join", 19 | "dblclick:relay(.channels [data-channel])": "join" 20 | }, 21 | limit: 100, 22 | chanmask: "", 23 | topicmask: "", 24 | 25 | onJoin: function(e,target) { 26 | this.fireEvent("addChannel", target.get("data-channel") || target.val() || target.get("href")); 27 | } 28 | }, 29 | 30 | postRender: function() { 31 | var self = this, 32 | options = self.options; 33 | 34 | irc.atheme.channelList(function(channels) { 35 | self.chanList = channels.map(function(channel) { 36 | return _.assign(channel, "topic", util.urlifier.parse(channel.topic));//urlify the channel - doesn't do colours yet 37 | }); 38 | self.update(); 39 | }, 0, options.limit, 1, options.chanmask, options.topicmask); 40 | }, 41 | 42 | update: _.debounce(function() { 43 | var self = this; 44 | var userFilter = self.element.getElement("input.filter").val(); 45 | var filterExp = new RegExp(String.escapeRegExp(userFilter), "i"); //jsperf.com/contains-ignore-case 46 | util.getTemplate("channel-list-content", function(template) { 47 | self.element.getElement(".channels tbody").html(template({ 48 | channels: self.chanList.filter(function(chan) { 49 | return !userFilter || filterExp.test(chan.name) || filterExp.test(chan.topic); 50 | }) 51 | })); 52 | }); 53 | }, 50) 54 | }); 55 | //<% } %> -------------------------------------------------------------------------------- /less/twbs/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | a[href^="javascript:"]:after, 30 | a[href^="#"]:after { 31 | content: ""; 32 | } 33 | 34 | pre, 35 | blockquote { 36 | border: 1px solid #999; 37 | page-break-inside: avoid; 38 | } 39 | 40 | thead { 41 | display: table-header-group; // h5bp.com/t 42 | } 43 | 44 | tr, 45 | img { 46 | page-break-inside: avoid; 47 | } 48 | 49 | img { 50 | max-width: 100% !important; 51 | } 52 | 53 | p, 54 | h2, 55 | h3 { 56 | orphans: 3; 57 | widows: 3; 58 | } 59 | 60 | h2, 61 | h3 { 62 | page-break-after: avoid; 63 | } 64 | 65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 66 | // Once fixed, we can just straight up remove this. 67 | select { 68 | background: #fff !important; 69 | } 70 | 71 | // Bootstrap components 72 | .navbar { 73 | display: none; 74 | } 75 | .table { 76 | td, 77 | th { 78 | background-color: #fff !important; 79 | } 80 | } 81 | .btn, 82 | .dropup > .btn { 83 | > .caret { 84 | border-top-color: #000 !important; 85 | } 86 | } 87 | .label { 88 | border: 1px solid #000; 89 | } 90 | 91 | .table { 92 | border-collapse: collapse !important; 93 | } 94 | .table-bordered { 95 | th, 96 | td { 97 | border: 1px solid #ddd !important; 98 | } 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /less/qwebirc/core.less: -------------------------------------------------------------------------------- 1 | /*! qwebirc -- Copyright (C) 2008-2012 Chris Porter and the qwebirc project --- All rights reserved. */ 2 | 3 | #noscript { 4 | text-align: center; 5 | font-weight: bold; 6 | } 7 | 8 | html, body { 9 | height: 100%; 10 | } 11 | 12 | 13 | // Core QWebirc styles and helpers 14 | 15 | .qwebirc { 16 | height: 100%; 17 | width: 100%; 18 | overflow: hidden; 19 | font-family: @qweb-sans-serif; 20 | 21 | // MISC 22 | &.signed-in .buttons { 23 | display: inline-block; 24 | cursor: pointer; 25 | } 26 | .modal .alert { 27 | margin: 0; 28 | } 29 | 30 | .modal .modal-footer { 31 | margin: 0; 32 | padding: 10px 20px 10px; 33 | } 34 | 35 | .btn-smaller { 36 | padding: 2px 5px; 37 | font-size: 12px; 38 | line-height: 1.5; 39 | border-radius: 3px; 40 | } 41 | 42 | 43 | .attach, .detach, .tab-close { 44 | cursor: pointer; 45 | } 46 | 47 | .handle { 48 | z-index: 2; 49 | position: absolute; 50 | background-repeat: no-repeat; 51 | margin: auto; 52 | } 53 | 54 | .buttons span { 55 | vertical-align: middle; 56 | display: inline-block; 57 | } 58 | 59 | .buttons { 60 | display: none; 61 | } 62 | 63 | .center { 64 | margin-top: 5%; 65 | } 66 | 67 | .init-channels { 68 | font-size: 95%; 69 | text-align: center; 70 | color: #928D8D; 71 | } 72 | 73 | .monospace { 74 | font-family: @qweb-mono; 75 | } 76 | 77 | /*.handle.vertical { 78 | top: 0; 79 | bottom: 0; 80 | width: 10px; 81 | cursor: col-resize; 82 | z-index: 10; 83 | } 84 | .qui .show-nicklist .content .handle { 85 | display: block; 86 | } 87 | .handle.horizontal { 88 | height: 10px; 89 | cursor: row-resize; 90 | left: 0; 91 | right: 0; 92 | z-index: 10; 93 | }*/ 94 | 95 | .loading { 96 | padding-left: 4px; 97 | padding-top: 3px; 98 | font-size: 0.8em; 99 | } 100 | 101 | } 102 | 103 | @import "input"; -------------------------------------------------------------------------------- /js/src/components/Asset.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Based on Mootools/More/Assets 3 | * Promised based implementation 4 | * @depends [components, patches] 5 | * @provides [components/Loader] 6 | */ 7 | (function() { 8 | //hash of urls that have already loaded successfully 9 | var loaded = {}; 10 | components.loader = { 11 | javascript: function(source, properties) { 12 | return new Promise(function(fullfil, reject) { 13 | if(source in loaded) fullfil(); 14 | if (!properties) properties = {}; 15 | 16 | var script = new Element("script", { 17 | src: source, 18 | async: "" 19 | }); 20 | var doc = properties.document || document; 21 | var success = true; 22 | var onload = function() { 23 | if(success) fullfil(); 24 | loaded[source] = success; 25 | script.destroy(); 26 | }; 27 | var onerror = function() { 28 | reject(); 29 | success = false; 30 | script.destroy(); 31 | }; 32 | 33 | delete properties.document; 34 | 35 | if (!script.addEventListener){ 36 | script.addEvent("readystatechange", function(){ 37 | if (["loaded", "complete"].contains(this.readyState)) onload(); 38 | }); 39 | } else { 40 | script.addEvent("load", onload); 41 | } 42 | script 43 | .addEvent("error", onerror) 44 | .set(properties) 45 | .inject(doc.head); 46 | }); 47 | }, 48 | 49 | load: function(sources, properties) { 50 | if(!Type.isArray(sources)) sources = Array.from(arguments); 51 | if(!Type.isObject(properties)) { 52 | if(Type.isObject(_.last(sources))) properties = sources.pop(); 53 | } 54 | var promises = sources.map(function(source) { 55 | return components.loader.javascript(source, properties); 56 | }); 57 | return Promise.all(promises); 58 | } 59 | }; 60 | 61 | })(); -------------------------------------------------------------------------------- /less/twbs/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: not-allowed; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /js/src/ui/sounds.js: -------------------------------------------------------------------------------- 1 | /** 2 | * see http://indiegamr.com/the-state-of-audio-in-html5-games/ 3 | * @depends [sound] 4 | * @provides [sound/Player] 5 | */ 6 | sound.SoundPlayer = new Class({ 7 | Implements: [Options, Events], 8 | options: { 9 | soundsurl: qwebirc.global.staticBaseURL + "sound/", //directory of sounds for sm 10 | swfurl: qwebirc.global.staticBaseURL + "swf", 11 | flashVersion: 8, 12 | sounds: [], 13 | preferFlash: false //use html5 if possible 14 | }, 15 | loadingSM: false, 16 | 17 | initialize: function(options) { 18 | var self = this.setOptions(options); 19 | var opts = this.options; 20 | 21 | if (self.loadingSM !== false) return; 22 | self.loadingSM = true; 23 | if (self.sm) { 24 | self.fireEvent("ready"); 25 | return; 26 | } 27 | 28 | var soundinit = function() { 29 | var sm = self.sm = window.soundManager; 30 | self.play = sm.play; 31 | //https://www.scirra.com/blog/44/on-html5-audio-formats-aac-and-ogg 32 | sm.setup({ 33 | url: opts.swfurl, 34 | preferFlash: opts.preferFlash, 35 | onready: function() { 36 | opts.sounds.each(function(sound) {//load all sounds here 37 | // self.register(sound.id, opts.soundsurl + sound.url + extension); 38 | sound = _.clone(sound); 39 | sound.url = _.map(sound.url, function(path) { 40 | return path.contains("/") ? path : opts.soundsurl + path; 41 | }); 42 | sm.createSound(sound); 43 | }); 44 | self.loadingSM = false; 45 | self.fireEvent("ready"); 46 | } 47 | }).beginDelayedInit(); 48 | }; 49 | 50 | //load sound manager 51 | if(window.soundManager) { 52 | soundinit(); 53 | } 54 | else {//lazy load 55 | components.loader.javascript("<%= getFileURL('soundManager') %>").then(soundinit);//see gruntfile 56 | } 57 | }, 58 | 59 | register: function(alias,src) { 60 | this.sm.createSound(alias, src); 61 | }, 62 | 63 | isReady: function() { 64 | return this.sm && this.loadingSM === false; 65 | } 66 | }); 67 | -------------------------------------------------------------------------------- /less/twbs/responsive-utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // IE10 in Windows (Phone) 8 7 | // 8 | // Support for responsive views via media queries is kind of borked in IE10, for 9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix 10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and 11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at 12 | // our Getting Started page for more information on this bug. 13 | // 14 | // For more information, see the following: 15 | // 16 | // Issue: https://github.com/twbs/bootstrap/issues/10497 17 | // Docs: http://getbootstrap.com/getting-started/#browsers 18 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ 19 | 20 | @-ms-viewport { 21 | width: device-width; 22 | } 23 | 24 | 25 | // Visibility utilities 26 | .visible-xs, 27 | .visible-sm, 28 | .visible-md, 29 | .visible-lg { 30 | .responsive-invisibility(); 31 | } 32 | 33 | .visible-xs { 34 | @media (max-width: @screen-xs-max) { 35 | .responsive-visibility(); 36 | } 37 | } 38 | .visible-sm { 39 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { 40 | .responsive-visibility(); 41 | } 42 | } 43 | .visible-md { 44 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { 45 | .responsive-visibility(); 46 | } 47 | } 48 | .visible-lg { 49 | @media (min-width: @screen-lg-min) { 50 | .responsive-visibility(); 51 | } 52 | } 53 | 54 | .hidden-xs { 55 | @media (max-width: @screen-xs-max) { 56 | .responsive-invisibility(); 57 | } 58 | } 59 | .hidden-sm { 60 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { 61 | .responsive-invisibility(); 62 | } 63 | } 64 | .hidden-md { 65 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { 66 | .responsive-invisibility(); 67 | } 68 | } 69 | .hidden-lg { 70 | @media (min-width: @screen-lg-min) { 71 | .responsive-invisibility(); 72 | } 73 | } 74 | 75 | 76 | // Print utilities 77 | // 78 | // Media queries are placed on the inside to be mixin-friendly. 79 | 80 | .visible-print { 81 | .responsive-invisibility(); 82 | 83 | @media print { 84 | .responsive-visibility(); 85 | } 86 | } 87 | 88 | .hidden-print { 89 | @media print { 90 | .responsive-invisibility(); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /panes/partials/customNotice.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 26 | 29 | 35 | 38 | 41 | 42 |
    {{description}}
    43 |
    -------------------------------------------------------------------------------- /less/qwebirc/bootstrap-theme.less: -------------------------------------------------------------------------------- 1 | /*** old bootstrap btn:default *****/ 2 | @send-grey: #474949; 3 | @send-grey-back: darken(@send-grey, 20%); 4 | 5 | // .send:hover, 6 | // .send:focus, 7 | // .send:active, 8 | // .send.active { 9 | // background-color: #3a3c3c; 10 | // border-color: #2e2f2f; 11 | // } 12 | 13 | .qwebirc { 14 | 15 | //remove bold... 16 | input { 17 | font-weight: 500; 18 | } 19 | 20 | .send { 21 | .button-variant(grey; @send-grey; @send-grey-back); 22 | padding: 2px 10px; 23 | } 24 | // http://www.helloerik.com/column-examples/example4.html 25 | //Probably shouldnt do this as its included in 3.1 with different padding 26 | .container-fluid { 27 | padding: 0; 28 | // margin: 0 auto; 29 | } 30 | 31 | // Loop over each grid item and generate the css to remove padding 32 | //http://stackoverflow.com/questions/15239785/how-to-generate-css-with-loop-in-less 33 | // .remove-padding(@class) { 34 | // .col (@index) when (@index =< @grid-columns) { 35 | // @item: ".col-@{class}-@{index}"; 36 | 37 | // @{item} { 38 | // padding: 5px; 39 | // } 40 | 41 | // // next iteration 42 | // .col((@index + 1)); 43 | // } 44 | // .col(1); 45 | // } 46 | 47 | // // "call" the remove-padding the first time with highest value 48 | // .remove-padding (xs); 49 | // .remove-padding (sm); 50 | 51 | .make-grid-columns() { 52 | @grid-gutter-width: 0; 53 | // Common styles for all sizes of grid columns, widths 1-12 54 | .col(@index) when (@index = 1) { // initial 55 | @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}, .col-xl-@{index}"; 56 | .col((@index + 1), @item); 57 | } 58 | .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo 59 | @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}, .col-xl-@{index}"; 60 | .col((@index + 1), ~"@{list}, @{item}"); 61 | } 62 | .col(@index, @list) when (@index > @grid-columns) { // terminal 63 | @{list} { 64 | position: relative; 65 | // Prevent columns from collapsing when empty 66 | min-height: 1px; 67 | // Inner gutter via padding 68 | padding-left: (@grid-gutter-width / 2); 69 | padding-right: (@grid-gutter-width / 2); 70 | } 71 | } 72 | .col(1); // kickstart it 73 | } 74 | 75 | .make-grid-columns(); 76 | 77 | 78 | @screen-xl-min: 1500px; 79 | 80 | @media (min-width: @screen-xl-min) { 81 | .make-grid(xl); 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /js/src/constants/irc_lowertable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @depends [constants] 3 | * @provides [irc/LowerTable] 4 | */ 5 | constants.IRCLowerTable = [ 6 | /* x00-x07 */ 7 | "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", 8 | /* x08-x0f */ 9 | "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", 10 | /* x10-x17 */ 11 | "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", 12 | /* x18-x1f */ 13 | "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", 14 | /* " "-x27 */ 15 | " ", "!", "\"", "#", "$", "%", "&", "\x27", 16 | /* "("-"/" */ 17 | "(", ")", "*", "+", ",", "-", ".", "/", 18 | /* "0"-"7" */ 19 | "0", "1", "2", "3", "4", "5", "6", "7", 20 | /* "8"-"?" */ 21 | "8", "9", ":", ";", "<", "=", ">", "?", 22 | /* "@"-"G" */ 23 | "@", "a", "b", "c", "d", "e", "f", "g", 24 | /* "H"-"O" */ 25 | "h", "i", "j", "k", "l", "m", "n", "o", 26 | /* "P"-"W" */ 27 | "p", "q", "r", "s", "t", "u", "v", "w", 28 | /* "X"-"_" */ 29 | "x", "y", "z", "{", "|", "}", "~", "_", 30 | /* "`"-"g" */ 31 | "`", "a", "b", "c", "d", "e", "f", "g", 32 | /* "h"-"o" */ 33 | "h", "i", "j", "k", "l", "m", "n", "o", 34 | /* "p"-"w" */ 35 | "p", "q", "r", "s", "t", "u", "v", "w", 36 | /* "x"-x7f */ 37 | "x", "y", "z", "{", "|", "}", "~", "\x7f", 38 | /* x80-x87 */ 39 | "\x80", "\x81", "\x82", "\x83", "\x84", "\x85", "\x86", "\x87", 40 | /* x88-x8f */ 41 | "\x88", "\x89", "\x8a", "\x8b", "\x8c", "\x8d", "\x8e", "\x8f", 42 | /* x90-x97 */ 43 | "\x90", "\x91", "\x92", "\x93", "\x94", "\x95", "\x96", "\x97", 44 | /* x98-x9f */ 45 | "\x98", "\x99", "\x9a", "\x9b", "\x9c", "\x9d", "\x9e", "\x9f", 46 | /* xa0-xa7 */ 47 | "\xa0", "\xa1", "\xa2", "\xa3", "\xa4", "\xa5", "\xa6", "\xa7", 48 | /* xa8-xaf */ 49 | "\xa8", "\xa9", "\xaa", "\xab", "\xac", "\xad", "\xae", "\xaf", 50 | /* xb0-xb7 */ 51 | "\xb0", "\xb1", "\xb2", "\xb3", "\xb4", "\xb5", "\xb6", "\xb7", 52 | /* xb8-xbf */ 53 | "\xb8", "\xb9", "\xba", "\xbb", "\xbc", "\xbd", "\xbe", "\xbf", 54 | /* xc0-xc7 */ 55 | "\xe0", "\xe1", "\xe2", "\xe3", "\xe4", "\xe5", "\xe6", "\xe7", 56 | /* xc8-xcf */ 57 | "\xe8", "\xe9", "\xea", "\xeb", "\xec", "\xed", "\xee", "\xef", 58 | /* xd0-xd7 */ 59 | "\xf0", "\xf1", "\xf2", "\xf3", "\xf4", "\xf5", "\xf6", "\xd7", 60 | /* xd8-xdf */ 61 | "\xf8", "\xf9", "\xfa", "\xfb", "\xfc", "\xfd", "\xfe", "\xdf", 62 | /* xe0-xe7 */ 63 | "\xe0", "\xe1", "\xe2", "\xe3", "\xe4", "\xe5", "\xe6", "\xe7", 64 | /* xe8-xef */ 65 | "\xe8", "\xe9", "\xea", "\xeb", "\xec", "\xed", "\xee", "\xef", 66 | /* xf0-xf7 */ 67 | "\xf0", "\xf1", "\xf2", "\xf3", "\xf4", "\xf5", "\xf6", "\xf7", 68 | /* xf8-xff */ 69 | "\xf8", "\xf9", "\xfa", "\xfb", "\xfc", "\xfd", "\xfe", "\xff" 70 | ]; 71 | -------------------------------------------------------------------------------- /app-config.yml: -------------------------------------------------------------------------------- 1 | ## Front end settings that will be plugged in to configure/config.js (if you decide to only use provided customizations) 2 | ## You can update config.js to suit your needs 3 | ## These settings will be injected into qwebirc.js where appropriate and into the config intialization 4 | ## These will be compliled using lodash templates (see http://lodash.com/docs#template) with this file as the object 5 | 6 | #default network name 7 | network: "ChatNet" 8 | 9 | init_config: 10 | networkName: "<%= network %>" #eg Freenode 11 | appTitle: "<%= network %> WebIRC" #eg Freenode WebIRC 12 | uiOptions: #set any of the defaults values in js/src/config/options.js -- may be overriden by user 13 | colour: #hex values 14 | background: #"f0f7ff" 15 | font: #"000" 16 | brouhaha: 17 | enabled: false #no aggregator by default 18 | quit_msg: Page closed 19 | highlight: true # highlight messages 20 | beep_sound: #beep -- any of the sounds specified below 21 | 22 | client: 23 | loginRegex: "I recogni[sz]e you" #authed when this test passes on a message from a network service 24 | networkServices: 25 | #network hosts ie Services.Quakenet.net 26 | #- Services.Quakenet.net 27 | 28 | settings: #default (initial) user settings 29 | nickname: #"" 30 | username: #"" 31 | password: #"" 32 | channels: #[] 33 | auth: #false 34 | #demand authentication -- not setable by user 35 | requireAuth: false #require authentication? 36 | parseQueryString: true #should the query string be parse for option presets see https://github.com/megawac/qwebirc-enhancements#configuration 37 | 38 | user_settings: 39 | welcome_message: true #show a welcome message on first visit? 40 | 41 | qwebirc_config: #random variables you may wish to settings 42 | auth_command: #defaults to "AUTHSERV AUTH {username} {password}" though I've seen many different commands 43 | 44 | password_format: "{username} {password}" #for instance "{password}" 45 | 46 | base_url: / 47 | static_url: / 48 | 49 | router_prefix: ! #the hash prepended to urls starts with this string 50 | 51 | timeout: #timeout requests after period 52 | 53 | #for instance google analytics code. Below is jsdelivr tracking https://github.com/jsdelivr/jsdelivr#contribute-performance-data 54 | extra_html: 55 | templates: ## any data you would like to prefill the handlebars templates 56 | feedback_form_url: https://docs.google.com/forms/d/1DQUg-DOEMbmqqeCryhMr6t20m2EMSkng28HdWIUm2vM/viewform 57 | 58 | sounds: #supported sounds requires a mp3 and ogg file for each in /sound/ 59 | - beep 60 | - smb_coin 61 | - smb_kick 62 | - smb_pause 63 | - smb3_fireball 64 | - smb3_frog_mario_walk 65 | - smw_spring_jump 66 | - smw_stomp 67 | -------------------------------------------------------------------------------- /js/src/components/ImagePopover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * img popovers 3 | * 4 | * @depends [components] 5 | * @provides [components/ImagePopover] 6 | */ 7 | 8 | //create an image popover on (img) url hover 9 | //could use BS popovers here but this will be more efficent 10 | var imgRegex = /\.(gif|jpg|jpeg|tiff|png)$/i; 11 | components.ImagePopover = new Class({ 12 | initialize: function(element, enable) { 13 | this.element = element; 14 | this.events = { 15 | "mouseenter:relay(a)": this.show.bind(this), 16 | "mouseleave:relay(a)": _.debounce(this.hide.bind(this), 100) //throttled to prevent hover being toggled when leaving spaces 17 | }; 18 | this.toggle(enable); 19 | }, 20 | 21 | show: function(e, $tar) { 22 | var self = this; 23 | if (self.hide()) return; //no need already shown 24 | if (imgRegex.test($tar.href)) { 25 | self.target = $tar; 26 | self.current = Element.from(templates["image-popover"]({ 27 | image_url: $tar.href 28 | })) 29 | .inject(self.element) 30 | .setStyle("display", "block"); 31 | 32 | var tarPos = $tar.getCoordinates(); 33 | 34 | var payload = self.current.getElement(".payload") 35 | .addEvent("load", function() { 36 | self.current.getElement(".loading").dispose(); 37 | //set arrow position 38 | self.current.getElement(".arrow") 39 | .setStyle("top", Math.abs(tarPos.top - pos.y) + tarPos.height / 2); 40 | }); 41 | 42 | var maxWidth = payload.getComputedStyle("max-width").toInt(); 43 | var maxHeight = payload.getComputedStyle("max-height").toInt(); 44 | var imgMaxMin = { 45 | x: { 46 | min: 40, 47 | max: window.getWidth() - maxWidth - 40 48 | }, 49 | y: { 50 | min: 40, 51 | max: window.getHeight() - maxHeight - 40 52 | } 53 | }; 54 | 55 | var pos = { 56 | x: Math.min((Math.max(tarPos.right + 10, imgMaxMin.x.min)), imgMaxMin.x.max), 57 | y: Math.min((Math.max(e.client.y / 2, imgMaxMin.y.min)), imgMaxMin.y.max) 58 | }; 59 | 60 | self.current.setPosition(pos); 61 | } 62 | }, 63 | 64 | hide: function() { 65 | if (this.target && this.target.match(":hover")) return true; 66 | if (this.current) this.current.destroy(); 67 | this.current = this.target = null; 68 | }, 69 | 70 | toggle: function(state) { 71 | state = _.isBoolean(state) ? state : ! this.state; 72 | this.hide(); 73 | if (state !== this.state) { 74 | this.element[(state ? "add" : "remove") + "Events"](this.events); 75 | this.state = state; 76 | } 77 | return this; 78 | } 79 | }); -------------------------------------------------------------------------------- /less/twbs/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindex-tooltip; 10 | display: block; 11 | visibility: visible; 12 | font-size: @font-size-small; 13 | line-height: 1.4; 14 | .opacity(0); 15 | 16 | &.in { .opacity(@tooltip-opacity); } 17 | &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } 18 | &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } 19 | &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } 20 | &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; } 21 | } 22 | 23 | // Wrapper for the tooltip content 24 | .tooltip-inner { 25 | max-width: @tooltip-max-width; 26 | padding: 3px 8px; 27 | color: @tooltip-color; 28 | text-align: center; 29 | text-decoration: none; 30 | background-color: @tooltip-bg; 31 | border-radius: @border-radius-base; 32 | } 33 | 34 | // Arrows 35 | .tooltip-arrow { 36 | position: absolute; 37 | width: 0; 38 | height: 0; 39 | border-color: transparent; 40 | border-style: solid; 41 | } 42 | .tooltip { 43 | &.top .tooltip-arrow { 44 | bottom: 0; 45 | left: 50%; 46 | margin-left: -@tooltip-arrow-width; 47 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 48 | border-top-color: @tooltip-arrow-color; 49 | } 50 | &.top-left .tooltip-arrow { 51 | bottom: 0; 52 | left: @tooltip-arrow-width; 53 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 54 | border-top-color: @tooltip-arrow-color; 55 | } 56 | &.top-right .tooltip-arrow { 57 | bottom: 0; 58 | right: @tooltip-arrow-width; 59 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 60 | border-top-color: @tooltip-arrow-color; 61 | } 62 | &.right .tooltip-arrow { 63 | top: 50%; 64 | left: 0; 65 | margin-top: -@tooltip-arrow-width; 66 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0; 67 | border-right-color: @tooltip-arrow-color; 68 | } 69 | &.left .tooltip-arrow { 70 | top: 50%; 71 | right: 0; 72 | margin-top: -@tooltip-arrow-width; 73 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width; 74 | border-left-color: @tooltip-arrow-color; 75 | } 76 | &.bottom .tooltip-arrow { 77 | top: 0; 78 | left: 50%; 79 | margin-left: -@tooltip-arrow-width; 80 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 81 | border-bottom-color: @tooltip-arrow-color; 82 | } 83 | &.bottom-left .tooltip-arrow { 84 | top: 0; 85 | left: @tooltip-arrow-width; 86 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 87 | border-bottom-color: @tooltip-arrow-color; 88 | } 89 | &.bottom-right .tooltip-arrow { 90 | top: 0; 91 | right: @tooltip-arrow-width; 92 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 93 | border-bottom-color: @tooltip-arrow-color; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /less/qwebirc/irc-colours.less: -------------------------------------------------------------------------------- 1 | /*Highlighting*/ 2 | .lines, .colourline { 3 | 4 | .irc-fg0 { 5 | color: white; 6 | } 7 | 8 | .irc-fg1 { 9 | color: black; 10 | } 11 | 12 | .irc-fg2 { 13 | color: darkBlue; 14 | } 15 | 16 | .irc-fg3 { 17 | color: darkGreen; 18 | } 19 | 20 | .irc-fg4 { 21 | color: red; 22 | } 23 | 24 | .irc-fg5 { 25 | color: darkRed; 26 | } 27 | 28 | .irc-fg6 { 29 | color: purple; 30 | } 31 | 32 | .irc-fg7 { 33 | color: orange; 34 | } 35 | 36 | .irc-fg8 { 37 | color: yellow; 38 | } 39 | 40 | .irc-fg9 { 41 | color: green; 42 | } 43 | 44 | .irc-fg10 { 45 | color: teal; 46 | } 47 | 48 | .irc-fg11 { 49 | color: cyan; 50 | } 51 | 52 | .irc-fg12 { 53 | color: blue; 54 | } 55 | 56 | .irc-fg13 { 57 | color: fuchsia; 58 | } 59 | 60 | .irc-fg14 { 61 | color: dimGray; 62 | } 63 | 64 | .irc-fg15 { 65 | color: lightGray; 66 | } 67 | 68 | .irc-bg0 { 69 | background-color: white; 70 | } 71 | 72 | .irc-bg1 { 73 | background-color: black; 74 | } 75 | 76 | .irc-bg2 { 77 | background-color: darkBlue; 78 | } 79 | 80 | .irc-bg3 { 81 | background-color: darkGreen; 82 | } 83 | 84 | .irc-bg4 { 85 | background-color: red; 86 | } 87 | 88 | .irc-bg5 { 89 | background-color: darkRed; 90 | } 91 | 92 | .irc-bg6 { 93 | background-color: purple; 94 | } 95 | 96 | .irc-bg7 { 97 | background-color: orange; 98 | } 99 | 100 | .irc-bg8 { 101 | background-color: yellow; 102 | } 103 | 104 | .irc-bg9 { 105 | background-color: green; 106 | } 107 | 108 | .irc-bg10 { 109 | background-color: teal; 110 | } 111 | 112 | .irc-bg11 { 113 | background-color: cyan; 114 | } 115 | 116 | .irc-bg12 { 117 | background-color: blue; 118 | } 119 | 120 | .irc-bg13 { 121 | background-color: fuchsia; 122 | } 123 | 124 | .irc-bg14 { 125 | background-color: dimGray; 126 | } 127 | 128 | .irc-bg15 { 129 | background-color: lightGray; 130 | } 131 | 132 | .irc-bold { 133 | font-weight: bold; 134 | } 135 | 136 | .irc-underline { 137 | text-decoration: underline; 138 | } 139 | 140 | .irc-italic { 141 | font-style:italic 142 | } 143 | 144 | .warn { 145 | background-color: #ff9090; 146 | } 147 | 148 | .info { 149 | background-color: #9090ff; 150 | } 151 | } 152 | 153 | .lines .chan-notice, .lines .priv-notice { 154 | background-color: yellow !important; 155 | font-weight: bold; 156 | } 157 | 158 | .lines .server-notice { 159 | background: #C9C3B2; 160 | } 161 | -------------------------------------------------------------------------------- /less/twbs/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Reset the box-sizing 7 | // 8 | // Heads up! This reset may cause conflicts with some third-party widgets. 9 | // For recommendations on resolving such conflicts, see 10 | // http://getbootstrap.com/getting-started/#third-box-sizing 11 | * { 12 | .box-sizing(border-box); 13 | } 14 | *:before, 15 | *:after { 16 | .box-sizing(border-box); 17 | } 18 | 19 | 20 | // Body reset 21 | 22 | html { 23 | font-size: 62.5%; 24 | -webkit-tap-highlight-color: rgba(0,0,0,0); 25 | } 26 | 27 | body { 28 | font-family: @font-family-base; 29 | font-size: @font-size-base; 30 | line-height: @line-height-base; 31 | color: @text-color; 32 | background-color: @body-bg; 33 | } 34 | 35 | // Reset fonts for relevant elements 36 | input, 37 | button, 38 | select, 39 | textarea { 40 | font-family: inherit; 41 | font-size: inherit; 42 | line-height: inherit; 43 | } 44 | 45 | 46 | // Links 47 | 48 | a { 49 | color: @link-color; 50 | text-decoration: none; 51 | 52 | &:hover, 53 | &:focus { 54 | color: @link-hover-color; 55 | text-decoration: underline; 56 | } 57 | 58 | &:focus { 59 | .tab-focus(); 60 | } 61 | } 62 | 63 | 64 | // Figures 65 | // 66 | // We reset this here because previously Normalize had no `figure` margins. This 67 | // ensures we don't break anyone's use of the element. 68 | 69 | figure { 70 | margin: 0; 71 | } 72 | 73 | 74 | // Images 75 | 76 | img { 77 | vertical-align: middle; 78 | } 79 | 80 | // Responsive images (ensure images don't scale beyond their parents) 81 | .img-responsive { 82 | .img-responsive(); 83 | } 84 | 85 | // Rounded corners 86 | .img-rounded { 87 | border-radius: @border-radius-large; 88 | } 89 | 90 | // Image thumbnails 91 | // 92 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`. 93 | .img-thumbnail { 94 | padding: @thumbnail-padding; 95 | line-height: @line-height-base; 96 | background-color: @thumbnail-bg; 97 | border: 1px solid @thumbnail-border; 98 | border-radius: @thumbnail-border-radius; 99 | .transition(all .2s ease-in-out); 100 | 101 | // Keep them at most 100% wide 102 | .img-responsive(inline-block); 103 | } 104 | 105 | // Perfect circle 106 | .img-circle { 107 | border-radius: 50%; // set radius in percents 108 | } 109 | 110 | 111 | // Horizontal rules 112 | 113 | hr { 114 | margin-top: @line-height-computed; 115 | margin-bottom: @line-height-computed; 116 | border: 0; 117 | border-top: 1px solid @hr-border; 118 | } 119 | 120 | 121 | // Only display content to screen readers 122 | // 123 | // See: http://a11yproject.com/posts/how-to-hide-content/ 124 | 125 | .sr-only { 126 | position: absolute; 127 | width: 1px; 128 | height: 1px; 129 | margin: -1px; 130 | padding: 0; 131 | overflow: hidden; 132 | clip: rect(0,0,0,0); 133 | border: 0; 134 | } 135 | -------------------------------------------------------------------------------- /lang/panes/options/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "option": { 3 | "interface" : "Interface", 4 | "irc_opts" : "Chat Preferences", 5 | "notices" : "Notifications", 6 | "hotkeys" : "Hot Keys", 7 | 8 | "ENABLE_IMAGE_POPOUT" : "Pop images out on hover..?", 9 | "NICK_OV_STATUS" : "Show status (@/+) before nicknames in channel lines", 10 | "ACCEPT_SERVICE_INVITES" : "Automatically join channels when invited", 11 | "USE_HIDDENHOST" : "Hide your hostmask when authed (+x)", 12 | "LASTPOS_LINE" : "Show a last position indicator for each window", 13 | "HIDE_JOINPARTS" : "Hide JOINS/PARTS/QUITS", 14 | "BACKGROUND" : "Background colour", 15 | "FONT_COLOUR" : "Font colour", 16 | "SHOW_NICKLIST" : "Show nickname list in channels", 17 | "SHOW_TIMESTAMPS" : "Show timestamps", 18 | "FONT_SIZE" : "Font size (px)", 19 | "VOLUME" : "Volume", 20 | "AUTO_OPEN_PM" : "Automatically select window on private message", 21 | "FLASH" : "flash", 22 | "BEEP" : "beep", 23 | "PM" : "pm", 24 | "MENTION" : "mentioned", 25 | "ENABLE_BROUHAHA" : "Enable channel message aggregator (brouhaha)", 26 | "MESSAGE_PLACEHOLDER" : " something ... ", 27 | "NICK_PLACEHOLDER" : " someone ... ", 28 | "TYPE_PLACEHOLDER" : "type test", 29 | "DELETE_NOTICE" : "remove", 30 | "ADD_NOTICE" : "Add notifier", 31 | "USER_NOTICE" : "User:", 32 | "TYPE_NOTICE" : "Type:", 33 | "MESSAGE_NOTICE" : "Message:", 34 | "AUTOESCAPE" : "Escape text", 35 | "MENTIONED" : "Mentioned", 36 | "ESCAPE_HINT" : "This text is transformed into a regular expression - autoescaping will check for the exact text you entered", 37 | "DESKTOP_NOTICES" : "Receive desktop notifications if supported (on any notice with flash)", 38 | "IGNORE_CASE" : "Case insensitive", 39 | "NOTUS" : "Not us", 40 | "NOTUS_HINT" : "Not our message", 41 | "HIGHLIGHT" : "hl", 42 | "HIGHLIGHT_HINT" : "highlight", 43 | "QUIT_MSG" : "Set quit message: ", 44 | 45 | "NOTICE_SOUND" : "Sound played on notice", 46 | "TEST" : "Test", 47 | 48 | "standardNotices" : "Standard Notices", 49 | "customNotices" : "Custom Notices", 50 | 51 | "noticeDuration" : "Notification Duration", 52 | "noticeSupport" : "See notification support", 53 | 54 | "save" : "Save Changes", 55 | "revert" : "Revert" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /less/twbs/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on