Skip to content

Instantly share code, notes, and snippets.

View tammersaleh's full-sized avatar

Tammer Saleh tammersaleh

  • coreweave.com
  • California, USA
  • 18:26 (UTC -08:00)
View GitHub Profile
def ensure_owned_by_journalist
errors.add_to_base("You must be a journalist to create a counterpoint.") unless Counterpoint.creatable?
end
include Webrat::Matchers
def response_body
@response.body
end
// <div id="note1">
// <div class=".contents"/>
// </div>
// <div id="note2">
// <div class=".contents"/>
// </div>
function toggle_note_visibility(note) {
contents = note.find(".contents");
if (contents.is(":visible")) {
PlatosForms.SideBar = function (tab) {
var that = this;
// definied in the overlay
this.deck = document.getElementById("platos-forms-deck");
// create the browser for this tab
this.browser = document.createElementNS("http://www.w3.org/1999/xhtml","html:iframe");
this.browser.type = "content";
this.browser.orient = "vertical";
SideBar = function (tab) {
var that = this;
this.tab = tab;
// definied in the overlay
this.deck = document.getElementById("platos-forms-deck");
this.browser = document.createElement('browser');
this.browser.type = "content-primary";
tab_opened: function(event) {
PlatosForms.log("1");
var tab = event.target;
PlatosForms.log("2");
var sb = new PFSideBar();
PlatosForms.log("3");
tab.addAttribute("platos-forms-sidebar", sidebar);
PlatosForms.log("4");
PlatosForms.log("Tab " + tab._tPos + " added.");
},
PlatosForms.Sidebar = function (tab) {
this.tab = tab;
this.show = function() {
PlatosForms.log("showing the sidebar");
sidebar = document.getElementById("platos-forms-sidebar");
sidebar.hidden = false;
};
this.hide = function() {
tab_opened: function(event) {
var tab = event.target;
var sidebar = new PlatosForms.SideBar(tab);
tab["platos-forms-sidebar"] = sidebar;
*~
.DS_Store
.*.swp
<tabbrowser id="content">
<xul:browser>
<splitter id="platos-forms-splitter" collapse="after" persist="hidden"/>
<iframe src="http://google.com" orient="vertical" width="320" min-width="28">
</iframe>
</xul:browser>
</tabbrowser>