Skip to content

Instantly share code, notes, and snippets.

@zixuan75
Last active March 6, 2018 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zixuan75/ab4da82d027e1f8a98ea34c670309f2f to your computer and use it in GitHub Desktop.
Save zixuan75/ab4da82d027e1f8a98ea34c670309f2f to your computer and use it in GitHub Desktop.
The node master javascript file (based on the html_project repository). Only a html file can run this javascript file.
var topWindow=window.top
var centerWindow=window.center
function field(fields){
if (fields != ""){
return fields
} else {
var field=class{
constructor(){
var fieldConstructor="Logs"
this.fieldConstructor=fieldConstructor
if(!this.fieldConstructor){
return fieldConstructor
}else{
return this.fieldConstructor
}
field()
var reachField=this.fieldConstructor
console.log(reachField)
}
field(){
this.fields="constructorMain"
console.log(fields)
}
}
console.log(field)
if (field != fields){
return field
}else{
return fields+":"+field
}
}
}
var fields = class{
constructor(){
var onlyField=fieldPlus("Logs")
fieldMinus(onlyField)
}
fieldPlus(masterField){
if (!this.numberField){
var logger=masterField
this.numberField=logger
}else{
return this.numberField
}
}
fieldMinus(field){
this.numberField=field
this.plusField=this.numberField
}
}
console.log(fields)
var argumentsOfDefintion=field(fields)
var getMaster = class{
constructor(){
var plus="This is a property"
var master={
property: function(){
var properties=[1, 2, 3]
properties.forEach(property =>{
console.log(properties)
})
},
extend: function(variable){
this.enterRoadStation=variable.packages
this.variable=variable+this.enterRoadStation
var master=this.enterRoadStation
console.log(master+this.variable)
this.masterProjects=this.enterRoadStation+this.variable
},
getEnterRoadStation: function(){
return this.enterRoadStation
},
setEnterRoadStation: function(enterRoadStation){
this.enterRoadStation=enterRoadStation
}
}
var field=master
if (master != plus){
this.master=master
master.extend({
packages: {
extendFunction: function(extend){
this.osx=extend
}
}
})
}else{
this.master=null
}
master(field, master, plus)
}
setPlus(plus){
this.plus=plus
}
getMaster(master){
if (!this.master){
if (master==this.plus){
this.master=this.field
}else{
this.master=master
}
}
return this.master
}
master(field, master, plus){
this.field=field
this.master=getMaster(master)
this.plus=setPlus(plus)
}
}
console.log(getMaster)
var variables={
mixins: null,
getMixins: function(){
return this.mixins
},
setMixins: function(mixin){
this.mixins=mixin
}
}
class user{
constructor(){
this.userLogs=getMaster
}
setDefaultOption(mixin, option){
if (!this.defaultMixins){
this.defaultMixins=mixin
}
this.defaultOption=option
}
setContents(contents){
this.contents=contents
}
setLogs(logs){
this.logs=logs
}
setSettingLogs(settingLogs){
this.settingLogs=settingLogs
}
toString(){
return this.contents
}
preventDefault(option){
if (!this.mixins){
this.mixins=getMaster
}else{
this.defaultMixins=this.mixins
}
this.setDefaultOption(this.mixins, option)
}
contain(mixin){
this.setDefaultOption(mixin, {
add: function(){
return true
},
change: function(){
return true
},
remove: function(){
return true
}
})
}
variableTest(){
this.mixinDefaultOption=this.defaultOption
}
insert(mixin){
this.props.insert(mixin)
}
setProps(){
this.props={
mixin: null,
insert(mixins){
this.mixin=mixins
},
getProps(){
return this.mixin
}
}
}
}
var users=new user()
user.contents=[1, 2, 3]
user.settingLogs="contents: "+[1, 2, 3]
user.briefLogs=[{
getString: function(){
return this.string
},
setString: function(string){
this.string={
string: string,
convertToString: function(){
if(this.string){
return this.string
}else{
this.string=string
}
}
}
}
}]
user.userLogs=user.toString()
user.logs="none"
function getNewLogs(){
var logs={
settingLogs: users.settingLogs,
logs: users.logs,
property: class{
constructor(){
this.logs=user.logs
this.settingLogs=user.settingLogs
this.userLogs=user.userLogs
}
getLogs(){
if (this.logs){
return this.logs
}
}
setLogs(logs){
this.logs=logs
}
getSettingLogs(){
if (this.settingLogs){
return this.settingLogs
}else{
this.settingLogs=[1, 2, 3]
}
}
setSettingLogs(settingLogs){
this.settingLogs=settingLogs
}
getUserLogs(){
if (this.userLogs){
return this.userLogs
}
}
setUserLogs(userLogs){
this.userLogs=userLogs
}
}
}
console.log(logs.property)
}
module=new user()
event=new user()
var newLogs={
passMixinsToPosts(event){
event.preventDefault({
constructor(mixin){
this.events=event+mixin
}
})
this.events=event
},
getEvents(){
return this.events
},
string: {
string: function user(logProperty){
if (!this.property){
this.property=[{
properties: logProperty,
getProperties: function(){
return this.properties
},
setProperties: function(properties){
this.properties=properties
}
}]
}
return this.property
},
property: [1, 2, 3, 4],
array: {
mixins: null,
content: null,
getContent: function(){
if (!this.content){
if ($('#body').val() != null){
this.content=$('#body').val()
}else{
this.content=event
}
}
return this.content
},
setContent: function(content){
this.content=content
}
},
strings: {
insertToCollection(){
module.insert({
event: [event],
user: new user()
})
}
},
getMixins: function(property){
if (!this.mixins){
var contents=getMaster
this.mixins=contents+"\n"+property
}
if (property!=undefined){
return this.mixins
}
},
setMixins: function(mixins){
this.mixins=mixins
}
},
content: user.contents,
userLogs: user.settingLogs,
writeLogs: function(content){
var content=user.contents
content.forEach(contents =>{
var course=class{
constructor(){
this.contents=users.contents
this.settingLogs=users.settingLogs
this.logs=users.logs
var userSettingLogs=getSettingLogs()
console.log(userSettingLogs)
setSettingLogs(this.contents, this.logs)
}
getSettingLogs(){
if (!this.settingLogs){
this.userContents=user.contents
this.userLogs=user.logs
this.userBriefLogs=user.briefLogs
setSettingLogs(this.contents, this.logs)
}else{
this.briefLogs=user.briefLogs
return this.settingLogs
}
}
setSettingLogs(log, define){
this.settingLogs=log+define
}
setProperty(logs){
var accessor={
briefModels: undefined,
briefLogs: user.toString(),
model: user.briefLogs,
getModel: function(){
if (!this.model){
this.briefModels=[0]
setModel(this.briefModels)
}else{
if (!this.briefModels){
this.access=this.model
}else{
this.access=this.briefModels
}
}
return this.model
},
setModel: function(models){
this.model=models
},
setBriefLogs: function(log){
this.briefLogs=log
},
getBriefLogs: function(){
return this.briefLogs
},
getBriefModels: function(){
return this.briefModels
},
setBriefModels: function(briefModel){
this.briefModels=briefModel
}
}
console.log(accessor+logs)
}
}
console.log("%c User contents: "+course, 'color: #00FFFF')
})
}
}
function callNewLogs(func){
console.log(func)
}
newLogs.string.array.setContent(event)
var properties=newLogs.string.string([1, 2, 3, 4])
callNewLogs(newLogs)
document.write(
"<h3>"+newLogs+"\n"+"Objects: "+"</h3>"+"<font size='1'><p>"+properties+":"+user.contents+"</p></font>"
)
newLogs.writeLogs(user.contents)
getNewLogs()
if (newLogs.string.property != [1, 2, 3]){
newLogs.string.setMixins(getMaster)
var mixin={mixins: newLogs.string.getMixins(newLogs.string.property)}
variables.setMixins(mixin)
newLogs.passMixinsToPosts(new user() )
}else{
newLogs.string.setMixins({
mixin: null,
master: getMaster,
getMaster: function(){
if (this.master){
return this.master
}
},
setMaster: function(masterFunc){
this.master=masterFunc
},
addMixins: function(mixins){
this.mixin=mixins
},
passMixin: function(event){
event.preventDefault({
mixins: getMaster,
getData(){
return this.mixins
},
addMixin(){
newLogs.string.getMixins([1, 2, 3, 4]).addMixins(this.mixins)
}
})
event.variableTest()
},
event: [event]
})
newLogs.string.getMixins([1, 2, 3, 4]).passMixin(event)
var mixin={mixins: newLogs.string.getMixins([1, 2, 3, 4]).getMaster()}
variables.setMixins(mixin)
newLogs.passMixinsToPosts(new user() )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment