Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| (function debugify_content_script(){ | |
| console.log('debugify content script running'); | |
| var nativeWebSocket = window.WebSocket; | |
| var requests = window.requestLog = {}; | |
| var WebSocket = window.WebSocket = function(uri) { | |
| console.log('new WebSocket created', uri); | |
| this.websocket = new nativeWebSocket(uri); | |
| this.websocket.onopen = this.onOpen.bind(this); | |
| this.websocket.onmessage = this.onMessage.bind(this); | |
| this.listeners = {onmessage: null, onopen: null}; |
| //Paul Irish - http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/ | |
| $.fn.setAllToMaxHeight = function(){ | |
| return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
| } |
| module.exports = (grunt) -> | |
| 'use strict' | |
| grunt.initConfig | |
| coffee: | |
| debug: | |
| files: [ | |
| expand: true | |
| cwd: 'js' | |
| src: ['**/*.coffee', '!**/_*.coffee'] |
| var App = angular.module('App', []); | |
| App.controller('TodoCtrl', function($scope, $http) { | |
| $http.get('todos.json') | |
| .then(function(res){ | |
| $scope.todos = res.data; | |
| }); | |
| }); |
| // @see http://addyosmani.com/writing-modular-js/ | |
| // library was previously defined | |
| // AMD suppport | |
| if (typeof window.define === 'function' && window.define.amd !== undefined) { | |
| window.define('library', [], function () { | |
| return library; | |
| }); | |
| // CommonJS suppport | |
| } else if (typeof module !== 'undefined' && module.exports !== undefined) { |
| // Mixins | |
| // Since some horrible browsers (e.g., on *spit* Android) don’t let you change the | |
| // root em, I’m forced to use the browser default of 16px as the base. This mixin | |
| // will help me keep sane by using units that correspond to pixel units. | |
| line-height(h) | |
| if unit(h) == "rem" | |
| line-height: unit(h, 'px') | |
| line-height: unit(h/16, 'rem') |
| <html> | |
| <head> | |
| <title>Subscriber Test Page</title> | |
| <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css"> | |
| <style type="text/css" media="screen"> | |
| body { | |
| font-family: Myriad Pro, Helvetica, Arial; | |
| font-size:138.5%; | |
| } | |
| h1 { |
| <? | |
| // регистрируем обработчики | |
| AddEventHandler("subscribe", "BeforePostingSendMail", Array("MyClass", "BeforePostingSendMailHandler")); | |
| class MyClass | |
| { | |
| // создаем обработчик события "BeforePostingSendMail" | |
| /* если в теме рассылки будет команда [notify=some@body.ru], то на some@body.ru будет запрошено уведомление о прочтении писем */ | |
| function BeforePostingSendMailHandler($arFields) | |
| { |